Hi Richard, are you setting the value to 0 at index time when the
housenumber is not present? If you are, this would be as simple as modify
the query at the application layer to city = a, street= b, housenumber=(14
OR 0).
If you are not doing anything at index time with the not present
housenumbers, you could do something like city:a AND street:b AND
(housenumber:14 OR NOT housenumber:[* TO *]).

First option is better if you ask me. You can set the default value on your
schema. See http://wiki.apache.org/solr/SchemaXml#Fields

On Mon, Jun 6, 2011 at 1:14 PM, richardr <richard.redw...@yahoo.de> wrote:

> Dear list,
>
> i got a question regarding my address search:
> I am searching for address data. If there is one address field not definied
> (in this case the housenumber) for the specific query (e.g. city = a,
> street
> = b, housenumber=14), I am getting no result. For every street there exists
> at least one housenumber (=0).
>
> Is it possible to get this default value (housenumber 0) as a result, if
> the
> user is searching for the housenumber 14, which does not exist in our
> model?
>
> Thanks in advance,
> Richard
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/How-to-get-default-result-tp3030665p3030665.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to