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 Michal Danilák <mi...@gmail.com> on 2018/05/09 10:36:12 UTC

Faceting over ExternalFileField

Is it possible to facet over ExternalFileField values?

If I have this in my schema.xml:

<fieldType name="ext_file_field_id" class="solr.ExternalFileField"
keyField="id" defVal="0" stored="false" indexed="false" />

<field name="eff_age"    type="ext_file_field_id" />

And request the following facet:

facet={
    "age": {
        "field": "eff_age",
        "type": "terms",
        "limit": 10
    }
}

It returns an empty list of buckets.

First, it doesn't throw an error, which means, it should do something.
Second, if I'm not mistaken, external file fields behave like doc values,
so it should be possible to facet over them.

Am I doing something wrong? Is there some other way around this?

Thanks

-Michal

Re: Faceting over ExternalFileField

Posted by Mikhail Khludnev <mk...@apache.org>.
Absence of error is a bug for me. The problem is that eff is doubles not
strings with ordinals. It would be possible after
https://issues.apache.org/jira/browse/SOLR-10528
Now you can try to create several type:query subfacets passing either
{!frange} or just plain Lucene query (there is a slight chance they works
with eff).

On Wed, May 9, 2018 at 1:36 PM, Michal Danilák <mi...@gmail.com>
wrote:

> Is it possible to facet over ExternalFileField values?
>
> If I have this in my schema.xml:
>
> <fieldType name="ext_file_field_id" class="solr.ExternalFileField"
> keyField="id" defVal="0" stored="false" indexed="false" />
>
> <field name="eff_age"    type="ext_file_field_id" />
>
> And request the following facet:
>
> facet={
>     "age": {
>         "field": "eff_age",
>         "type": "terms",
>         "limit": 10
>     }
> }
>
> It returns an empty list of buckets.
>
> First, it doesn't throw an error, which means, it should do something.
> Second, if I'm not mistaken, external file fields behave like doc values,
> so it should be possible to facet over them.
>
> Am I doing something wrong? Is there some other way around this?
>
> Thanks
>
> -Michal
>



-- 
Sincerely yours
Mikhail Khludnev