You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Neha Gupta <ne...@uni-jena.de> on 2022/03/31 10:42:24 UTC

Problem with facet in SOLR

Dear All,

I am new to solr and need your help.

I have indexed postgresql database in SOLR and trying my hands on SOLR GUI.

I have indexed 4 fields and want to use facet on "taxo_domain_mother" 
but i am not getting any result


I tried but not able to make it working. Will appreciate you help.

Do i need to configure something for "taxo_domain_mother" field so that 
it can be used as facet ?


Regards

Neha Gupta

Re: Problem with facet in SOLR

Posted by Andy Lester <an...@petdance.com>.

> On Apr 1, 2022, at 3:59 AM, Neha Gupta <ne...@uni-jena.de> wrote:
> 
> Now i had set docValues=true for this attribute and not facet is working.
> 
> Just want to know is it necessary to set the docValue to true to make facet working for the attribute?

I don’t think docValues is necessary, but it will make things faster. It’s going to have to be either stored=true or docValues=true.

If you’re still looking for help, we need to see exact queries you’re making, and the exact responses you’re getting.

Andy

Re: Problem with facet in SOLR

Posted by Dave <ha...@gmail.com>.
Other things to consider, without seeing your raw query, is make sure facet=true is in it, and ideally for facets you want a string field rather than text and I docvalues/stored being true, then rerun a sample index and test again. Also facets work on dynamic fields as well, I don’t. Know if docvals do however

> On Apr 3, 2022, at 1:03 AM, Neha Gupta <ne...@uni-jena.de> wrote:
> 
> Thanks James...this is what i was looking for.
> 
>> On 02/04/2022 03:24, James Greene wrote:
>> Either docValues set to true or field needs to be indexed to use the field
>> with faceting.
>> 
>>> On Fri, Apr 1, 2022, 5:01 AM Neha Gupta <ne...@uni-jena.de> wrote:
>>> 
>>> Hello Andy,
>>> 
>>> Thanks for the reply.
>>> 
>>> I had given
>>> 
>>> facet.field=taxo_domain_mother
>>> 
>>> in the query but no result was coming.
>>> 
>>> Now i had set docValues=true for this attribute and not facet is working.
>>> 
>>> Just want to know is it necessary to set the docValue to true to make
>>> facet working for the attribute?
>>> 
>>> 
>>> Thanks and Regards
>>> 
>>> Neha Gupta
>>> 
>>> 
>>> On 31/03/2022 17:05, Andy Lester wrote:
>>>>> I have indexed 4 fields and want to use facet on "taxo_domain_mother"
>>> but i am not getting any result<vPpLj101qM64P0fA.png>
>>>> It looks like you don’t have facet.field=taxo_domain_mother specified in
>>> your query.   It’s hard to tell exactly because screenshots make it
>>> difficult to figure things out.
>>>> 
>>>> 
>>>>> Do i need to configure something for "taxo_domain_mother" field so that
>>> it can be used as facet ?
>>>> For performance, you want docValues=“true” on any field you facet on.
>>>> 
>>>> Try adding a facet.field=taxo_domain_mother to your query.  If it
>>> doesn’t work, and you need more help, please cut & paste the exact text of
>>> the query, and then the exact text of the response.  Or make a Gist on
>>> GitHub.
>>>> Andy
>>>> 

Re: Problem with facet in SOLR

Posted by Neha Gupta <ne...@uni-jena.de>.
Thanks James...this is what i was looking for.

On 02/04/2022 03:24, James Greene wrote:
> Either docValues set to true or field needs to be indexed to use the field
> with faceting.
>
> On Fri, Apr 1, 2022, 5:01 AM Neha Gupta <ne...@uni-jena.de> wrote:
>
>> Hello Andy,
>>
>> Thanks for the reply.
>>
>> I had given
>>
>> facet.field=taxo_domain_mother
>>
>> in the query but no result was coming.
>>
>> Now i had set docValues=true for this attribute and not facet is working.
>>
>> Just want to know is it necessary to set the docValue to true to make
>> facet working for the attribute?
>>
>>
>> Thanks and Regards
>>
>> Neha Gupta
>>
>>
>> On 31/03/2022 17:05, Andy Lester wrote:
>>>> I have indexed 4 fields and want to use facet on "taxo_domain_mother"
>> but i am not getting any result<vPpLj101qM64P0fA.png>
>>> It looks like you don’t have facet.field=taxo_domain_mother specified in
>> your query.   It’s hard to tell exactly because screenshots make it
>> difficult to figure things out.
>>>
>>>
>>>> Do i need to configure something for "taxo_domain_mother" field so that
>> it can be used as facet ?
>>> For performance, you want docValues=“true” on any field you facet on.
>>>
>>> Try adding a facet.field=taxo_domain_mother to your query.  If it
>> doesn’t work, and you need more help, please cut & paste the exact text of
>> the query, and then the exact text of the response.  Or make a Gist on
>> GitHub.
>>> Andy
>>>

Re: Problem with facet in SOLR

Posted by James Greene <ja...@jamesaustingreene.com>.
Either docValues set to true or field needs to be indexed to use the field
with faceting.

On Fri, Apr 1, 2022, 5:01 AM Neha Gupta <ne...@uni-jena.de> wrote:

> Hello Andy,
>
> Thanks for the reply.
>
> I had given
>
> facet.field=taxo_domain_mother
>
> in the query but no result was coming.
>
> Now i had set docValues=true for this attribute and not facet is working.
>
> Just want to know is it necessary to set the docValue to true to make
> facet working for the attribute?
>
>
> Thanks and Regards
>
> Neha Gupta
>
>
> On 31/03/2022 17:05, Andy Lester wrote:
> >> I have indexed 4 fields and want to use facet on "taxo_domain_mother"
> but i am not getting any result<vPpLj101qM64P0fA.png>
> > It looks like you don’t have facet.field=taxo_domain_mother specified in
> your query.   It’s hard to tell exactly because screenshots make it
> difficult to figure things out.
> >
> >
> >
> >> Do i need to configure something for "taxo_domain_mother" field so that
> it can be used as facet ?
> > For performance, you want docValues=“true” on any field you facet on.
> >
> > Try adding a facet.field=taxo_domain_mother to your query.  If it
> doesn’t work, and you need more help, please cut & paste the exact text of
> the query, and then the exact text of the response.  Or make a Gist on
> GitHub.
> >
> > Andy
> >
>

Re: Problem with facet in SOLR

Posted by Neha Gupta <ne...@uni-jena.de>.
Hello Andy,

Thanks for the reply.

I had given

facet.field=taxo_domain_mother

in the query but no result was coming.

Now i had set docValues=true for this attribute and not facet is working.

Just want to know is it necessary to set the docValue to true to make 
facet working for the attribute?


Thanks and Regards

Neha Gupta


On 31/03/2022 17:05, Andy Lester wrote:
>> I have indexed 4 fields and want to use facet on "taxo_domain_mother" but i am not getting any result<vPpLj101qM64P0fA.png>
> It looks like you don’t have facet.field=taxo_domain_mother specified in your query.   It’s hard to tell exactly because screenshots make it difficult to figure things out.
>
>
>
>> Do i need to configure something for "taxo_domain_mother" field so that it can be used as facet ?
> For performance, you want docValues=“true” on any field you facet on.
>
> Try adding a facet.field=taxo_domain_mother to your query.  If it doesn’t work, and you need more help, please cut & paste the exact text of the query, and then the exact text of the response.  Or make a Gist on GitHub.
>
> Andy
>

Re: Problem with facet in SOLR

Posted by Andy Lester <an...@petdance.com>.
> I have indexed 4 fields and want to use facet on "taxo_domain_mother" but i am not getting any result<vPpLj101qM64P0fA.png>

It looks like you don’t have facet.field=taxo_domain_mother specified in your query.   It’s hard to tell exactly because screenshots make it difficult to figure things out.



> Do i need to configure something for "taxo_domain_mother" field so that it can be used as facet ?

For performance, you want docValues=“true” on any field you facet on.

Try adding a facet.field=taxo_domain_mother to your query.  If it doesn’t work, and you need more help, please cut & paste the exact text of the query, and then the exact text of the response.  Or make a Gist on GitHub.

Andy