inveniosoftware / invenio-query-parser

Search query parser supporting Invenio and SPIRES search syntax.
https://invenio-query-parser.readthedocs.io
GNU General Public License v2.0
8 stars 18 forks source link

use "greedy" parsing when no keywords #47

Open jmartinm opened 8 years ago

jmartinm commented 8 years ago

For searches where there are no keywords (like a free text search for title or abstract), currently the invenio-query-parser will break each of the individual values by spaces and create a big query where each value is separated by the AND boolean operator.

In order for ElasticSearch to do a better job on ranking it is recommended to pass the whole string and a list of fields to match from.

This was implemented outside of the query parser for INSPIRE (see https://github.com/inspirehep/invenio-search/commit/f2c9a074cc804e745f1f959fa7d73199be3774da) but might be better for the query-parser to support it.

jmartinm commented 8 years ago

@jirikuncar this is the issue we talked about.

jmartinm commented 8 years ago

@jirikuncar the implementation mentioned above works for us atm. Just created the issue in case somebody on your side can take on the challenge as we looked at the beginning at implementing it on the query parser but did not find a solution.

Unassigned so that it does not look like the issue is being worked on our side.

tiborsimko commented 8 years ago

:+1: for the greedy approach

lnielsen commented 8 years ago

Added possibility for using ES syntax directly in Records-REST.