I am going to have a go at this. Maybe others can add/correct.

When you make a request to Solr, it hits a request handler first. E.g.
a "/select" request handler. That's defined in solrconfig.xml

The request handler can change your request with some defaults,
required and overriding parameters.

For "solr.SearchHandler", it can also define what search components
stack then processes the actual request. They can define it explicitly
(e.g. "/suggest" request handler),  use default stack or
append/prepend to the default stack (e.g. "/spell" request Handler).

The default search component stack can be seen in the commented out
section of solrconfig.xml and consists of 6 components: query, facet,
mlt (MoreLikeThis), highlight, stats, and debug.

Query component is the one that actually does the searching and
figuring out what the result documents are. And it uses query parsers
for that. There are multiple query parsers available. The most common
are "standard/lucene", "dismax" and "edismax". But there is a bunch
more: https://cwiki.apache.org/confluence/display/solr/Query+Syntax+and+Parsing

If you don't have query components, you are not actually searching for
documents, you are doing something else (e.g. spelling).

These parsers transform what you sent in your URL (in the "q"
parameter, but also others) into the Lucene or internal queries that
return documents with some ranking attached.

Then, other components do their own things too. facet components add
facets. highlight components add highlight sections based on the
already collected information and so on.

Then, all that gets serialized into one of many supported formats
(XML, JSON, Ruby, etc) and sent back to the client.

If you want examples, then just read through solrconfig.xml and
shema.xml and understand how they hang together. That's why they are
so long, so people can see the defaults and examples. If you did not
care for that, your solrconfig.xml could be as small as:
https://github.com/arafalov/solr-indexing-book/blob/master/published/collection1/conf/solrconfig.xml

Regards,
   Alex.
P.s. The interesting question in return is "where are you stuck that
you think that knowing what query parser is will move you further
ahead?"
Personal website: http://www.outerthoughts.com/
Current project: http://www.solr-start.com/ - Accelerating your Solr proficiency


On Fri, Jun 20, 2014 at 3:55 PM, Vivekanand Ittigi
<vi...@biginfolabs.com> wrote:
> Hi,
>
> I think this might be a silly question but i want to make it clear.
>
> What is query parser...? What does it do.? I know its used for converting
> query. But from What to what?what is the input and what is the output of
> query parser. And where exactly this feature can be used?
>
> If possible please explain with the example. It really helps a lot?
>
> Thanks,
> Vivek

Reply via email to