Thanks for response, Let me explain with an example. I have following fields : name, description, id, title. These fields have following values: doc1 - name : test description : test and run id : t1 title : abc title
doc2 - name : abc description : test and run again id : t2 title : xyz title You can see name and description both contain "test", so my question is if I will query for "test" using "q" parameter without specifying the fields in either "df" or "qf", will it be able to search? Because I tried, and I think you have to mention the fields otherwise it will not work. If I will put "df" and "qf" value as "name", so it will return only doc1, but I want to return both documents when I query "test" (Because description also contains "test"). Will it be possible without configuring the "df" or "qf"? Is there any way to apply search on all fields? Thanks Renuka Srishti On Sun, Jul 29, 2018 at 8:12 PM, Erick Erickson <erickerick...@gmail.com> wrote: > What do you want Solr to do in that case? Search all the defined > fields? Some of them? Pick randomly? > > This is like asking "can Solr do what I want without telling it what I > want?". > > You can define df or qf _defaults_ in solrconfig.xml for the request > handler, that's what those are for. > Then the _user_ doesn't need to specify them. Somebody has to however > and defaults are how those > are usually done. > > Best, > Erick > > On Sun, Jul 29, 2018 at 7:07 AM, Alexandre Rafalovitch > <arafa...@gmail.com> wrote: > > Solr does need to know what field(s) you want to search. And you can > > configure all of these things in solrconfig.xml, so the user does not > > have to provide that. > > > > Just remember, unless you really know what you are doing, you should > > not be exposing Solr directly to the user/browser. Think of it more > > like a database with another layer between it and user-queries. > > Otherwise, somebody could delete your whole index, etc. > > > > Regards, > > Alex. > > > > On 29 July 2018 at 09:11, Renuka Srishti <renuka.srisht...@gmail.com> > wrote: > >> Hi, > >> > >> Is there any possible way to perform search by using "q" or "query" > >> parameter without setting "df" parameter or "qf" parameter. > >> > >> for example: I am passing "q":"xyz" > >> I have to mention the field for which I want to perform query otherwise > I > >> will not get results. > >> > >> What is the way if I want to search on all documents without mentioning > any > >> field. > >> for example : I am passing "q":"xyz" > >> If I query like that, it should return all the documents containing that > >> value. No need to mention the fields. > >> > >> Thanks > >> Renuka Srishti >