"MUSIC ALBUM" is the value of one of the field (asset_type) in the indexed document.
On Mon, Jun 17, 2013 at 9:06 PM, Jack Krupansky <j...@basetechnology.com>wrote: > What does the actual indexed data look like? Maybe "ALBUM" doesn't > immediately follow "MUSIC", at least in that particular field. Or, maybe > you added "MUSIC" and "ALBUM" as two separate values for that field and > Solr then implicitly added the +100 position gap between them. > > -- Jack Krupansky > > -----Original Message----- From: Prathik Puthran > Sent: Monday, June 17, 2013 11:20 AM > To: solr-user@lucene.apache.org > Subject: Re: Filtered Query in Solr > > > Can you please explain why the 2nd one works? > > > > > On Mon, Jun 17, 2013 at 8:49 PM, Prathik Puthran < > prathik.puthra...@gmail.com> wrote: > > The first one i.e. fq=asset_type:"MUSIC ALBUM" doesen't work. >> >> However the 2nd one works >> fq=asset_type:(+MUSIC +ALBUM) >> >> Thanks for the response. >> >> Regards, >> Prathik >> >> >> On Mon, Jun 17, 2013 at 8:41 PM, Upayavira <u...@odoko.co.uk> wrote: >> >> Your fq query is: >>> >>> fq=asset_type:MUSIC ALBUM >>> >>> This is actually interpreted as: >>> fq=asset_type:MUSIC text:ALBUM >>> >>> You probably want: >>> fq=asset_type:"MUSIC ALBUM" >>> or >>> fq=asset_type:(+MUSIC +ALBUM) >>> or even: >>> fq:{!term f=asset_type}MUSIC ALBUM >>> >>> Upayavira >>> >>> On Mon, Jun 17, 2013, at 03:57 PM, Prathik Puthran wrote: >>> > Hi, >>> > >>> > I am making a select request to solr with with 'fq=asset_type:MUSIC >>> > ALBUM' >>> > (see query 1 below) as one of the GET parameter. This request does not >>> > return any results. However when I send the select request with the >>> > parameter 'asset_type=MUSIC ALBUM'(see query 2 below) I get the > >>> results. >>> > >>> > Does the filtered query parser do anything special (like split based on >>> > the >>> > spaces) before processing the request? How do I avoid this from >>> > happening? >>> > >>> > Query 1 --> >>> > >>> http://localhost:8080/solr/**assets/select?q=amitabh&fq=** >>> asset_type%3AMUSIC%20ALBUM&wt=**json<http://localhost:8080/solr/assets/select?q=amitabh&fq=asset_type%3AMUSIC%20ALBUM&wt=json> >>> > >>> > Query 2 --> >>> > >>> http://localhost:8080/solr/**assets/select?wt=json&q=** >>> amitabh&indent=true&sort=**release_year%20desc&asset_** >>> type=MUSIC%20ALBUM<http://localhost:8080/solr/assets/select?wt=json&q=amitabh&indent=true&sort=release_year%20desc&asset_type=MUSIC%20ALBUM> >>> > >>> > >>> > Thanks, >>> > Prathik >>> >>> >> >> >