You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by danben <da...@gmail.com> on 2009/09/25 16:14:08 UTC

Faceted Search on Dynamic Fields?

I'm trying to perform a faceted query with the facet field referencing a
field that is not in the schema but matches a dynamicField with its suffix. 
The query returns results but for some reason the facet list is always
empty.  When I change the facet field to one that is explicitly named in the
schema I get the proper results.  Is this expected behavior?  I wasn't able
to find anything in the docs about dynamic fields wrt faceting.

One other thing I thought might have been causing the problem is that the
values in this field are mostly distinct (that won't be the case in the
actual application, I'm just doing it this way now to see how faceted
queries behave).  However, when I performed the same query with a static
field with lots of distinct values I just got an OutOfMemoryError, which
leads me back to my original hypothesis.

So, is it the case that faceted queries are not permitted on dynamic facet
fields, and if so, is there any workaround?
-- 
View this message in context: http://www.nabble.com/Faceted-Search-on-Dynamic-Fields--tp25612887p25612887.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Faceted Search on Dynamic Fields?

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Fri, Sep 25, 2009 at 12:19 PM, Avlesh Singh <av...@gmail.com> wrote:
> Faceting, as of now, can only be done of definitive field names.

To further clarify, the fields you can facet on can include those
defined by dynamic fields.  You just must specify the exact field name
when you facet.

       <dynamicField name="*&amp;STRING_NOT_ANALYZED_YES" type="string"
indexed="true" stored="true" multiValued="true"/>

Did you really mean for the ampersand to be in the dynamic field name?
 I'd advise against this, and it could be the source of your problems
(escaping the ampersand in your request, etc).

What is the exact facet request you are sending?


-Yonik
http://www.lucidimagination.com

Re: Faceted Search on Dynamic Fields?

Posted by Avlesh Singh <av...@gmail.com>.
Faceting, as of now, can only be done of definitive field names. Faceting on
field names matching wildcards (dynamic field being one such scenario) is
yet to be supported. There are lot of open issues, aiming to achieve this.
Find a similar discussion here -
http://www.lucidimagination.com/search/document/787cc8cc9ea095e6/item_facet

Cheers
Avlesh

On Fri, Sep 25, 2009 at 7:47 PM, danben <da...@gmail.com> wrote:

>
> Also, here is the field definition in the schema
>
>        <dynamicField name="*&amp;STRING_NOT_ANALYZED_YES" type="string"
> indexed="true" stored="true" multiValued="true"/>
>
>
> --
> View this message in context:
> http://www.nabble.com/Faceted-Search-on-Dynamic-Fields--tp25612887p25612936.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>

Re: Faceted Search on Dynamic Fields?

Posted by danben <da...@gmail.com>.
Also, here is the field definition in the schema

        <dynamicField name="*&amp;STRING_NOT_ANALYZED_YES" type="string"
indexed="true" stored="true" multiValued="true"/>


-- 
View this message in context: http://www.nabble.com/Faceted-Search-on-Dynamic-Fields--tp25612887p25612936.html
Sent from the Solr - User mailing list archive at Nabble.com.