Hi Uwe
Unfortunately, at the stage I am required to do this,  I do not have the
query text. I only have the parsed query.
I thought of iterating through the query clauses etc but could not find how
to. What function allows me to do this ?
Regards
Puneet Pawaia
On 6 Jul 2013 20:06, "Uwe Schindler" <u...@thetaphi.de> wrote:

> Hi,
>
> You can only do this manually with instanceof checks and walking through
> BooleanClauses.
>
> The better way to fix your problem would be to change your query parser,
> e.g. by overriding getFieldQuery and other protected methods to enforce a
> specific field while parsing the query string.
>
> Uwe
>
>
>
> Puneet Pawaia <puneet.paw...@gmail.com> schrieb:
> >Hi all,
> >
> >I am using Lucene.Net 3.0.3 and need to search in a specific field
> >(ignoring any fields specified in the query). I am given a parsed
> >Lucene
> >Query so I am unable to generate a parsed query with my required field.
> >
> >Is there any functionality in Lucene that allows me to loop through the
> >terms of the query and change the field ? The given query would be a
> >complex query where there would be spans, clauses etc.
> >
> >Or perhaps there is some way of forcing Lucene to ignore the fields
> >given
> >in the parsed query and used a specified field only.
> >
> >Any help would be most appreciated.
> >
> >Regards
> >Puneet Pawaia
>
> --
> Uwe Schindler
> H.-H.-Meier-Allee 63, 28213 Bremen
> http://www.thetaphi.de

Reply via email to