You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Anshul jain <an...@epfl.ch> on 2009/01/18 04:29:58 UTC

Solr configuration for queries

Hi,

I need to configure solr, such that it doesn't do any fancy stuff like
adding adding wildcard characters to normal query, check for existing
fields, etc.

I've modified lucene code for Term queries(can be multiple terms) and I need
to process only term queries. But solr modifies queries and converts them to
range queries. I just need that solr simply pass the query to lucene
IndexSearcher and do nothing else in between. Is it possible?

Cheers,
Anshul

-- 
Anshul Jain

Re: Solr configuration for queries

Posted by Julian Davchev <jm...@drun.net>.
Not sure what you mean but you can always escape query special characters
and then enclose whatever passed in double quotes. This way you'll have
it treated as phrase each time.

http://lucene.apache.org/java/2_4_0/queryparsersyntax.html
Scroll to 'escaping special characters'

+ - && || ! ( ) { } [ ] ^ " ~ * ? : \

Cheers

Anshul jain wrote:
> Hi,
>
> I need to configure solr, such that it doesn't do any fancy stuff like
> adding adding wildcard characters to normal query, check for existing
> fields, etc.
>
> I've modified lucene code for Term queries(can be multiple terms) and I need
> to process only term queries. But solr modifies queries and converts them to
> range queries. I just need that solr simply pass the query to lucene
> IndexSearcher and do nothing else in between. Is it possible?
>
> Cheers,
> Anshul
>
>   


Re: Solr configuration for queries

Posted by Chris Hostetter <ho...@fucit.org>.
: I need to configure solr, such that it doesn't do any fancy stuff like
: adding adding wildcard characters to normal query, check for existing
: fields, etc.
: 
: I've modified lucene code for Term queries(can be multiple terms) and I need
: to process only term queries. But solr modifies queries and converts them to
: range queries. I just need that solr simply pass the query to lucene
: IndexSearcher and do nothing else in between. Is it possible?

i'm not entirely sure i understand what you mean ("check for existing 
fields" ?!?!) but you may want to take a look at the FieldQParserPlugin, 
it sounds like it might meet your needs -- if not, it will probably serve 
as a good starting point for implementing your own QParser to generate 
exactly the type of query you want based on the input.



-Hoss