My recommendation is to use the simple_query_string, which is a mini
language for itself.
Beside this, I am about completing a plugin for Contextual Query Language
(CQL) and Search/Retrieve via URL (SRU) for bibliographic searches, which
is very close to your question.
https://github.com/xbib/elasticsearch-sru
The reason is I'm connecting legacy library systems to Elasticsearch for
very basic queries like book searches. In CQL, imagine queries like this
dc.creator = "Harriet Beecher Stowe" and dc.title = "Uncle Tom's cabin"
on docs like this
{
"dc" : {
"title" : "Uncle Tom's cabin",
"creator" : "Harriet Beecher Stowe"
}
}
With SRU 2.0/searchRetrieve 1.0, you can even add parameters for facets =
simple terms aggregation.
At the moment, I'm adding Handlebars templates for rendering ES
SearchResponse to SRU XML (which is part of the legacy I have to address)
Jörg
On Tue, Aug 12, 2014 at 7:39 PM, Ivan Brusic ivan@brusic.com wrote:
Look into the Lucene query parser, which its the syntax that the query
string query uses. After that, look into the various Lucene contrib modules
that extend the query syntax (span near is one).
I do not think that anyone has implemented a new query parser as an
elasticsearch plugin yet, but I could be wrong.
Cheers,
Ivan
On Aug 12, 2014 1:33 PM, "Erik Paulson" epaulson@unit1127.com wrote:
Hello -
Github has a pretty slick search interface for issues, complete with a
set of qualifiers that users can stick onto their free-form text queries.
They're using ES for their code search, and I'm guessing for their issues
as well:
Searching issues and pull requests - GitHub Docs
Is there a good library or example code somewhere that implements a
similar query language? Obviously some qualifiers are github-specific, but
other operators are more generic (in: is:, the quantified operators, etc)
I'm building a search interface for some data and documents with the
interface nothing more than a single search bar - basically, starting with
something like Calaca. My users aren't going to write ES queries directly,
but the power users could use qualifiers. Obviously, this isn't exactly
rocket science, but if there's a good example of a simple web frontend that
parses a simple query DSL and converts it into an ES search, I'd love to
use that rather than reinventing the wheel. Any language on the backend is
really fine, I'm not attached to anything yet so if there was Ruby or
Python or really whatever, it's fine by me.
Thanks for any pointers you might have!
-Erik
--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAKJO4n7VenJC7dj1wU3bx4BJw8UL4GRiBwzht1Uma0V3-Vwkng%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAKJO4n7VenJC7dj1wU3bx4BJw8UL4GRiBwzht1Uma0V3-Vwkng%40mail.gmail.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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBCXHPtLuyWRbCw37_N7u4nBR_i6EKEd3cLpM%2B-0pW8gg%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBCXHPtLuyWRbCw37_N7u4nBR_i6EKEd3cLpM%2B-0pW8gg%40mail.gmail.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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFtwNK4MmZBNGDxz5iuW8nGczP%2B927QcATam4YBLgZJNg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.