lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <>
Subject [jira] [Commented] (SOLR-7070) Issue when using "fl" with dynamic filelds without setting wilcards
Date Wed, 04 Feb 2015 21:11:35 GMT


Hoss Man commented on SOLR-7070:

this appears to be the same root issue as SOLR-6051.

in that issue it was decided that the appropriate "fix" was to more explicitly document that
field names starting with numbers were discouraged and would not work in all situations.

bq. Anyone know why 1_FOO is interpreted as a function and not a field name? Smells like a

it's because of the hueristic nature of "fl" parsing and support for numeric literals as functions
-- eg: {{fl=123,foo,bar,sum(123,yak)}} to request that for every document the fields foo &
bar be returned, along with a numeric constant of "123", and the result of the sum function
on the constant 123 and the yak field.

as for why field names like this might have worked in 4.6 but stoped working in more recent
versions: probably due to new features being added to fl parsing that tweaked hte hueristic

we could probably improve the hueristic to do a better job with field names like this (i've
done that for similar situations in the past) but in SOLR-6051 it was decided that documentation
was a better choice.

alternatively: we could add a DocTransformer for the explicit purpose to dealing with funky
field names (start with numbers, contain whitespace, contain commas, etc...) with a syntax
something like...

fl=[field n='123_field'],simple_field_name,[field n='field name with spaces & punc\'uation']

> Issue when using "fl" with dynamic filelds without setting wilcards
> -------------------------------------------------------------------
>                 Key: SOLR-7070
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.10.3
>            Reporter: Khalid Galal
>              Labels: dynamic, fields
>             Fix For: 4.6
> Issue when using "fl" with dynamic fields without setting wildcards, such as:
> In solr 4.6, I used to select dynamic fields by exact match, e.g. the below query used
to work with me:
> fl=123_PART
> But in solr 4.10.3, the above query doesn't work any more, so I am forced to use a wildcards,
such as to be begin with match, e.g. the below query:
> fl=*_PART
> The above query works but returns all dynamic fields that end with "_PART", and that
results in bad performance as our dynamic fields are stored.
> Is there any way to be able to select a dynamic field exactly like in version 4.6?

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message