lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Savvas Andreas Moysidis <savvas.andreas.moysi...@gmail.com>
Subject Re: Use a boolean field as a flag for another, just stored, field
Date Sun, 09 Sep 2012 21:47:40 GMT
Hi,

In your field declaration you can specify a "default" value of
something your field will be populated with in absence of any value
and later at search time run filter queries against that value.
Bare in mind that if you want to filter your results based on any
value you *have* to index that value. Simply storing it won't work.

Hope that helps,
Savvas

On 9 September 2012 22:18, simple350 <aurelinp@yahoo.com> wrote:
>
> Hi,
>
> I want to be able to select from the index the documents who have a certain
> field not null. The problem is that the field is not indexed just stored.
> I'm not interested in indexing that field as it is just an internal URL.
>
> The idea was to add another field to the document - a boolean field - based
> on the initial field: 'True' for exiting field, 'False' for null - I could
> copy the initial field and use some analyzer having as output a bool result.
>
> Before trying to build a custom analyzer I wanted to ask if anything like
> this makes sense or if it is already available in Solr or if I completely
> missed some point.
>
> Regards,
> Alex
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Use-a-boolean-field-as-a-flag-for-another-just-stored-field-tp4006484.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message