Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Ability to use custom QueryParsers #25

Open
dustinschultz opened this issue Apr 23, 2015 · 6 comments
Open

Ability to use custom QueryParsers #25

dustinschultz opened this issue Apr 23, 2015 · 6 comments
Assignees

Comments

@dustinschultz
Copy link

Hi,

Feature Request

There's already the ability to have custom analyzers but it'd be really nice if you could configure a custom QueryParser as well. Custom functionality often requires subclassing QueryParser and not being able to use it in Luke means resorting to not using Luke at all.

In addition, there are several supported versions of subclasses of QueryParser that are bundled with lucene (e.g. AnalyzingQueryParser)

Thanks,
Dustin

@DmitryKey
Copy link
Owner

good point @dustinschultz . Luke allows for custom analyzers. See: https://github.com/DmitryKey/luke/blob/master/luke.sh

Adding support for query parsers sounds a logical feature along with custom analyzers. Will need to poke around the code and see how to do this.

@DmitryKey DmitryKey self-assigned this Oct 24, 2015
@Moddus
Copy link

Moddus commented Jul 25, 2016

Hi everyone,
i've tried to implement the functionality to specify a custom QueryParser.
In the code I've found the Parameter '-xmlQueryParserFactory' but I've no
idea how this parameter works. Could anyone give me some advice?

Thanks

@DmitryKey
Copy link
Owner

DmitryKey commented Jul 27, 2016

hi @Moddus !

Tracing the code, I see that it is the xml parser in lucene. Check the org.apache.lucene.queryparser.xml. Take a look at wiki: https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-XMLQueryParser

If you don't pass the command line option you mentioned, the default parser is going to be used: CorePlusExtensionsParser.

@Moddus
Copy link

Moddus commented Jul 27, 2016

Thanks @DmitryKey for your advice.
I'm looking forward to make the QueryParser configurable.

@DmitryKey
Copy link
Owner

Exciting, thanks @Moddus

@mocobeta
Copy link
Collaborator

For contributors: Now Luke is a part of Apache Lucene. Please create an issue (if there is not exist) to Lucene Jira if you want to help with this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants