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 joeMcElroy <ph...@gmail.com> on 2008/11/10 12:35:03 UTC

simple filter query solr processing

i have instances of felds which have commas seperating them. i need it to be
treated as one filter (even tho its seperated by commas) for example

facet : film,media,mass communication

rendered result by solr

Cannot parse ' +i_subjects:"Film': Lexical error at line 1, column 19. 
Encountered: <EOF> after : "\"Film"

i_subjects:"Film&fq=+media&fq=+mass+communication"

i do not want it splitting commas and replacing them with fq, but completely
matching on i_subjects:"film,media,mass communication"

is this possible? i reckon there is some config option to turn this off? 

background to the problem

i am indexing items which have a metadata called subjects. this would be for
example humanities/film, media, mass communication/film

im tokenizing on the "/" which results in humanities ; film, media, mass
communication

everything works except when the 'category' involves ","

tried with removing the quotes 

 fq=+%2Bi_subjects:Film&fq=+media&fq=+mass+communication

but results in no matches

tried splitting on the commas and inserting the key at each part

+%2Bi_subjects:Film+%2Bi_subjects:+media+%2Bi_subjects:+mass+communication

showed no results.



tried removing the plusses i am inserting but now shows too many results

&fq=+i_subjects:Film+i_subjects:+media+i_subjects:+mass+communication

tried putting quotes in between each filter part

&fq=+i_subjects:"Film"+i_subjects:"+media"+i_subjects:"+mass+communication"

now shows too few results


any pointers please?

joe


-- 
View this message in context: http://www.nabble.com/simple-filter-query-solr-processing-tp20418363p20418363.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: simple filter query solr processing

Posted by Chris Hostetter <ho...@fucit.org>.

: Cannot parse ' +i_subjects:"Film': Lexical error at line 1, column 19. 
: Encountered: <EOF> after : "\"Film"

: i do not want it splitting commas and replacing them with fq, but completely
: matching on i_subjects:"film,media,mass communication"

i'm having trouble interpreting the formating of your email, and 
understanding exactly what you've indexed, and waht your query looks like.

can you please send:

 1) the full url you are using when you get that error
 2) the XML output from /admin/luke?fl=i_subjects&numTerms=100

Assuming you've indexed the exact string...

	film,media,mass communication

then this should work fine in your URL...

	fq=i_subject%3A%22film%2Cmedia%2Cmass+communication%22

-Hoss


Re: simple filter query solr processing

Posted by joeMcElroy <ph...@gmail.com>.
tried that and managed to get no results. cheers for the help

&fq=i_subjects:Anesthesia&fq=i_subjects:Intensive+Care&fq=i_subjects:Pain+Management



ryantxu wrote:
> 
>>
>> tried removing the plusses i am inserting but now shows too many  
>> results
>>
>> &fq=+i_subjects:Film+i_subjects:+media+i_subjects:+mass+communication
>>
> 
> fq is a multi-valued field, try calling it like:
> 
> &fq=i_subjects:Film&fq=i_subjects:mass communication&fq=...
> 
> ryan
> 
> 

-- 
View this message in context: http://www.nabble.com/simple-filter-query-solr-processing-tp20418363p20457529.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: simple filter query solr processing

Posted by Ryan McKinley <ry...@gmail.com>.
>
> tried removing the plusses i am inserting but now shows too many  
> results
>
> &fq=+i_subjects:Film+i_subjects:+media+i_subjects:+mass+communication
>

fq is a multi-valued field, try calling it like:

&fq=i_subjects:Film&fq=i_subjects:mass communication&fq=...

ryan