You just need to create a Lucene QueryParser (implementing QueryBuilder) and register it like so: https://github.com/elasticsearch/elasticsearch/issues/3264#issuecomment-20247436
However, Elasticsearch provides a very good and expressive query DSL - so I'd rather look at doing this on your search facade, and generate a verbose query JSON to send to Elasticsearch. Many things that you have to support in Solr via custom query parsers can be done using the provided query DSL with Elasticsearch because JSON is way better than LocalParams etc Alternatively, NLP and POS tagging could be done also on the analysis level. I'd look at doing using TeeSinkTolenFilters. -- Itamar Syn-Hershko http://code972.com | @synhershko <https://twitter.com/synhershko> Freelance Developer & Consultant Lucene.NET committer and PMC member On Tue, Mar 3, 2015 at 12:12 PM, Oranit Dror <[email protected]> wrote: > Hi, > > I will be glad to get some more information on your suggestion to write my > own QueryParser as a plugin. To be more specific, I would like that this > parser will do some Natural Language processing on the full text query > string, supplied by the user, in the front-end search bar. In fact, in SolR > I have implemented such a parser (as a QParserPlugin subclass). The output > of the parser plugin should be a new string that I would like to give to > ElasticSearch. > > Additionally, before displaying the returned results, I would like to add > my own code for selecting the text that I would like to highlight. In SolR, > I have implemented a class that extends the > DefaultSolrHighlighter class. > > thank you, > Oranit. > > On Monday, March 2, 2015 at 10:46:32 PM UTC+2, Itamar Syn-Hershko wrote: >> >> You can write your own QueryParser as a plugin but that sounds like an >> overkill. If all you need is display some highlighted results its easy >> enough to do in any language and I'd say you don't really need Kibana for >> that >> >> -- >> >> Itamar Syn-Hershko >> http://code972.com | @synhershko <https://twitter.com/synhershko> >> Freelance Developer & Consultant >> Lucene.NET committer and PMC member >> >> On Mon, Mar 2, 2015 at 10:27 PM, Oranit Dror <[email protected]> wrote: >> >>> Hi, >>> >>> I am new to ElasticSearch and have a newbie question: I want to have a >>> user-friendly front-end to the data with a free text search bar. In this >>> search bar the user inputs a query string, which I would like to parse and >>> transform to a new string (application-dependent) that will be used on >>> ElasticSearch. I then want to highlight the matching search terms in the >>> results. I have implemented a similar application in Solr. >>> >>> I thought of using Kibana's Discover page. Is there a way to hook into >>> Kibana and/or ElasticSearch, so I can transform the user's query string >>> before it is sent to ES and highlight the results? >>> >>> Regards, >>> Oranit >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "elasticsearch" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit https://groups.google.com/d/ >>> msgid/elasticsearch/648dfc5a-49e4-4a82-8b4a-2497a90dad42% >>> 40googlegroups.com >>> <https://groups.google.com/d/msgid/elasticsearch/648dfc5a-49e4-4a82-8b4a-2497a90dad42%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > You received this message because you are subscribed to the Google Groups > "elasticsearch" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/5d8e4b46-a68f-42d8-b097-0848fde5508c%40googlegroups.com > <https://groups.google.com/d/msgid/elasticsearch/5d8e4b46-a68f-42d8-b097-0848fde5508c%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAHTr4Zs%2BbzJzkcPY7FYi0W7FDuYf9v-9%3DngL_PXhtokCgBPDzQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
