Facet Filter

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Facet Filter

Anil-2
HI ,

Following are the facets in my use case

CLOSED
IN PROCESS
RE PROCESS
OPEN

i know facet.prefix returns returns the facets starting with it.

i just want to check if any facet parameter is exist in current solr to
return facets on matching any word in the facet text ?

Ex : PROCESS  must return IN PROCESS and RE PROCESS.

This is can achivied by including it as query (<facet field> : *PROCESS*,
<facet field> : PROCESS). but it is little expensive.

Regards,
Anil
Reply | Threaded
Open this post in threaded view
|

Re: Facet Filter

Malcolm Upayavira Holmes
facet.contains=

Beware that it is relatively new, so will only be in the latest few Solr
releases.

I think this was it [1], which suggests it is in 5.1+

Upayavira
[1] https://issues.apache.org/jira/browse/SOLR-1387

On Thu, Feb 18, 2016, at 10:38 AM, Anil wrote:

> HI ,
>
> Following are the facets in my use case
>
> CLOSED
> IN PROCESS
> RE PROCESS
> OPEN
>
> i know facet.prefix returns returns the facets starting with it.
>
> i just want to check if any facet parameter is exist in current solr to
> return facets on matching any word in the facet text ?
>
> Ex : PROCESS  must return IN PROCESS and RE PROCESS.
>
> This is can achivied by including it as query (<facet field> : *PROCESS*,
> <facet field> : PROCESS). but it is little expensive.
>
> Regards,
> Anil
Reply | Threaded
Open this post in threaded view
|

Re: Facet Filter

Anil-2
Thank you, i just checked in 5.1.

as facet fields has to be Strings and cannot be tockenized. is there any
way to search on case insensitive search on this field (not in a facet
filter scenario).

Regards,
Anil

On 18 February 2016 at 17:34, Upayavira <[hidden email]> wrote:

> facet.contains=
>
> Beware that it is relatively new, so will only be in the latest few Solr
> releases.
>
> I think this was it [1], which suggests it is in 5.1+
>
> Upayavira
> [1] https://issues.apache.org/jira/browse/SOLR-1387
>
> On Thu, Feb 18, 2016, at 10:38 AM, Anil wrote:
> > HI ,
> >
> > Following are the facets in my use case
> >
> > CLOSED
> > IN PROCESS
> > RE PROCESS
> > OPEN
> >
> > i know facet.prefix returns returns the facets starting with it.
> >
> > i just want to check if any facet parameter is exist in current solr to
> > return facets on matching any word in the facet text ?
> >
> > Ex : PROCESS  must return IN PROCESS and RE PROCESS.
> >
> > This is can achivied by including it as query (<facet field> : *PROCESS*,
> > <facet field> : PROCESS). but it is little expensive.
> >
> > Regards,
> > Anil
>
Reply | Threaded
Open this post in threaded view
|

Re: Facet Filter

Shawn Heisey-2
On 2/18/2016 7:12 AM, Anil wrote:
> Thank you, i just checked in 5.1.
>
> as facet fields has to be Strings and cannot be tockenized. is there any
> way to search on case insensitive search on this field (not in a facet
> filter scenario).

If you configure docValues on the field in schema.xml and reindex, then
the returned facets will be the original input values even if the field
is tokenized, just as if you had used a string type without docValues.
This should allow you to use one field for queries *and* facets.

The reindex *is* required after adding docValues, and the index will be
larger.

Note that using 5.1 isn't recommended at this point.  You should use the
latest version available.  Currently that's 5.4.1, but soon it will be 5.5.

Thanks,
Shawn

Reply | Threaded
Open this post in threaded view
|

Re: Facet Filter

Anil-2
Thanks Shawn. This really helps. we are using 4.10.3 now.. will look into
5.4.1. Thanks.

Regards,
Anil

On 18 February 2016 at 20:04, Shawn Heisey <[hidden email]> wrote:

> On 2/18/2016 7:12 AM, Anil wrote:
> > Thank you, i just checked in 5.1.
> >
> > as facet fields has to be Strings and cannot be tockenized. is there any
> > way to search on case insensitive search on this field (not in a facet
> > filter scenario).
>
> If you configure docValues on the field in schema.xml and reindex, then
> the returned facets will be the original input values even if the field
> is tokenized, just as if you had used a string type without docValues.
> This should allow you to use one field for queries *and* facets.
>
> The reindex *is* required after adding docValues, and the index will be
> larger.
>
> Note that using 5.1 isn't recommended at this point.  You should use the
> latest version available.  Currently that's 5.4.1, but soon it will be 5.5.
>
> Thanks,
> Shawn
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Facet Filter

Anil-2
HI Shawn,

solr Documentation says docValues=true/false works for only few fields.
will that work on Text field ?

Copy from the reference guide -

DocValues are only available for specific field types. The types chosen
determine the underlying Lucene
docValue type that will be used. The available Solr field types are:
StrField and UUIDField.
If the field is single-valued (i.e., multi-valued is false), Lucene will
use the SORTED type.
If the field is multi-valued, Lucene will use the SORTED_SET type.
If you have already indexed data into your Solr index, you will need to
completely re-index your content
after changing your field definitions in schema.xml in order to
successfully use docValues.

Any Trie* numeric fields and EnumField.
If the field is single-valued (i.e., multi-valued is false), Lucene will
use the NUMERIC type.
If the field is multi-valued, Lucene will use the SORTED_SET type.


Regards,
Anil

On 19 February 2016 at 08:49, Anil <[hidden email]> wrote:

> Thanks Shawn. This really helps. we are using 4.10.3 now.. will look into
> 5.4.1. Thanks.
>
> Regards,
> Anil
>
> On 18 February 2016 at 20:04, Shawn Heisey <[hidden email]> wrote:
>
>> On 2/18/2016 7:12 AM, Anil wrote:
>> > Thank you, i just checked in 5.1.
>> >
>> > as facet fields has to be Strings and cannot be tockenized. is there any
>> > way to search on case insensitive search on this field (not in a facet
>> > filter scenario).
>>
>> If you configure docValues on the field in schema.xml and reindex, then
>> the returned facets will be the original input values even if the field
>> is tokenized, just as if you had used a string type without docValues.
>> This should allow you to use one field for queries *and* facets.
>>
>> The reindex *is* required after adding docValues, and the index will be
>> larger.
>>
>> Note that using 5.1 isn't recommended at this point.  You should use the
>> latest version available.  Currently that's 5.4.1, but soon it will be
>> 5.5.
>>
>> Thanks,
>> Shawn
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Facet Filter

Toke Eskildsen
On Mon, 2016-02-22 at 11:48 +0530, Anil wrote:
> solr Documentation says docValues=true/false works for only few fields.
> will that work on Text field ?

No. It might at some point, but so far it is just a feature request:
https://issues.apache.org/jira/browse/SOLR-8362



- Toke Eskildsen, State and University Library, Denmark


Reply | Threaded
Open this post in threaded view
|

Re: Facet Filter

Anil-2
Thank you.

it means to we need to create two fields of same content to support facet
and case insensitive , term search on a field. Agree?

Thanks again,.

Regards,
Anil

On 22 February 2016 at 16:07, Toke Eskildsen <[hidden email]> wrote:

> On Mon, 2016-02-22 at 11:48 +0530, Anil wrote:
> > solr Documentation says docValues=true/false works for only few fields.
> > will that work on Text field ?
>
> No. It might at some point, but so far it is just a feature request:
> https://issues.apache.org/jira/browse/SOLR-8362
>
>
>
> - Toke Eskildsen, State and University Library, Denmark
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Facet Filter

Toke Eskildsen
Anil <[hidden email]> wrote:
> it means to we need to create two fields of same content to support
> facet and case insensitive , term search on a field. Agree?

As things are now, yes.

- Toke Eskildsen