lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tommy Chheng <tommy.chh...@gmail.com>
Subject Re: filter querying working on dynamic int fields but not dynamic string fields?
Date Wed, 20 Jan 2010 22:14:11 GMT
Thanks,  quoting it fixed it. I'm also going to strip the 
leading/trailing whitespace at index time.

Tommy

On 1/20/10 1:47 PM, Erik Hatcher wrote:
>
> On Jan 20, 2010, at 4:27 PM, Tommy Chheng wrote:
>
>> I'm having trouble doing a filter query on a string field. Any ideas 
>> why it's working on dynamic int fields but not dynamic string fields?
>>
>> ex.
>> http://localhost:8983/solr/select?indent=on&version=2.2&q=climate - 
>> correct
>> http://localhost:8983/solr/select?version=2.2&q=climate&fq=awardedamounttodate_i%3A88900
FQ 
>> with dynamic int field returns one result - correct
>> http://localhost:8983/solr/select?indent=on&version=2.2&q=climate&fq=awardinstrument_s:Continuing+grant
returns 
>> zero results - Incorrect
>
> fq=field:value with spaces
>
> is problematic - it is being parsed as a SolrQueryParser expression.  
> It should work if you quote it - fq=field:"value with spaces"
>
> However, as I mentioned earlier today on the list, I think the best 
> option for facet narrowing on string fields is this:
>
>    fq={!raw f=field}value with spaces
>
> Of course all of the above need to be URL encoded too.
>
>> <str>+awardinstrument_s:Continuing +text:grant</str></arr>
>
> This explains the problem exactly.  Note how it parsed the second word 
> to the text field, not the field you specified.
>
>     Erik
>
>

Mime
View raw message