Hi Otis, Thanks for replying to my query.
My query is, if multiple values are provided for a custom field then how can it be represented in a SOLR query. So if my field is fileID and its values are 111, 222 and 333 and my search string is ‘product’ then how can this be represented in a SOLR query? I want to perform the search on basis of fileIDs *and* search string provided. If i provide the query in the format, q=fileID:111+fileID:222+fileID:333+product, then how will it actually search? Can you please provide me the correct format of the query? Regards Suryasnat Das On Mon, Jul 6, 2009 at 10:05 PM, Otis Gospodnetic < otis_gospodne...@yahoo.com> wrote: > > I actually don't fully understand your question. > q=+fileID:111+fileID:222+fileID:333+apple looks like a valid query to me. > (not sure what that space encoded as + is, though) > > Also not sure what you mean by: > > Basically the requirement is , if fileIDs are provided as search > parameter > > then search should happen on the basis of fileID. > > > Do you mean "apple" should be ignored if a term (field name:field value) is > provided? > > Otis > -- > Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch > > > > ----- Original Message ---- > > From: Suryasnat Das <suryaatw...@gmail.com> > > To: solr-user@lucene.apache.org > > Sent: Monday, July 6, 2009 11:31:10 AM > > Subject: Multiple values for custom fields provided in SOLR query > > > > Hi, > > I have a requirement in which i need to have multiple values in my custom > > fields while forming the search query to SOLR. For example, > > fileID is my custom field. I have defined the fileID in schema.xml as > > name="fileID" type="string" indexed="true" stored="true" required="true" > > multiValued="true"/>. > > Now fileID can have multiple values like 111,222,333 etc. So will my > query > > be of the form, > > > > q=+fileID:111+fileID:222+fileID:333+apple > > > > where apple is my search query string. I tried with the above query but > it > > did not work. SOLR gave invalid query error. > > Basically the requirement is , if fileIDs are provided as search > parameter > > then search should happen on the basis of fileID. > > > > Is my approach correct or i need to do something else? Please, if > immediate > > help is provided then that would be great. > > > > Regards > > Suryasnat Das > > Infosys. > >