s)
Create a query matching any of the specified 1D values.
Regards,
Karthick
-Original Message-
From: Nicolás Lichtmaier [mailto:nicol...@wolfram.com.INVALID]
Sent: Tuesday, November 24, 2020 1:25 PM
To: java-user@lucene.apache.org; Stephane Passignat
Subject: Re: MultiFieldQuery
I think you will need to subclass MultiFieldQueryParser so that the
proper Query is created when the field is the numeric one. Maybe
overriding createFieldQuery().
El 8/10/20 a las 11:48, Stephane Passignat escribió:
Hi,
I'm trying to index numeric, and then to query them using java api and
lu
Hi,
it seems I do not raise a lot of interest here... anyway I try again
with a simpler question.
Is MultiFieldQueryParser usable in 8.6.0 ?
thanks
Message initial
De: Stephane Passignat
Répondre à: java-user@lucene.apache.org
À: java-user@lucene.apache.org
Objet: MultiField
Thank you Trejkaz!
Inspired by your solution I've created the attached extension to the
MFQP, a little different than you proposed. In getFieldQuery, if a
(stop)word is removed by an analyzer for some field, it will return
null, so that term is then ignored (only if using AND as default
operator).
On Wed, Jun 8, 2011 at 6:52 PM, Elmer wrote:
> the parsed query becomes:
>
> '+(title:the) +(title:project desc:project)'.
>
> So, the problem is that docs that have the term 'the' only appearing in
> their desc field are excluded from the results.
Subclass MFQP and override getFieldQuery.
If th
I'm sure you are right and I'm wrong - sorry for the waste of space.
However I still think you should build it all up in code.
--
Ian.
On Wed, Jun 8, 2011 at 4:33 PM, Elmer wrote:
>> Using MFQP with AND
>> everywhere you'll never get a match if some fields don't contain all
>> of the search te
> Using MFQP with AND
> everywhere you'll never get a match if some fields don't contain all
> of the search terms"
I'm sorry to say, but that's not true I guess, look how the query parser
parses the following query:
'information retrieval'
--parsed-to-->
+(title:inform description:inform authors.
Then surely the stop word issue is a red herring. Using MFQP with AND
everywhere you'll never get a match if some fields don't contain all
of the search terms.
Even if Erick's exact answer won't apply, I suspect that building up a
composite boolean query is the way to go.
--
Ian.
On Wed, Jun 8
Sorry, I made a mistake here:
> Unfortunately, the solution that Erick gave won't do the trick
> > > bq.add(qp.parse("title:(the AND project)", SHOULD))
> > > bq.add(qp.parse("desc:(the AND project)", SHOULD))
> This still won't match documents where both 'the' and 'project' appear
> in DIFFERENT
Thank you,
I already use the PerFieldAnalyzerWrapper (by Hibernate Search) ;)
And that's where the problem comes in: different fields using different
analyzers (some with, some without a stopfilter). For each term
(tokenized by MFQP itself?), it applies the given analyzer on each
field. If the ana
You're right, that's a better place to start
Erick
On Wed, Jun 8, 2011 at 9:42 AM, Ian Lea wrote:
> Except that I think he has loads of other fields and wants to keep it simple.
>
> But how about passing a PerFieldAnalyzerWrapper instance as the
> analyzer to MFQP? Worth a try.
>
>
> --
> I
Except that I think he has loads of other fields and wants to keep it simple.
But how about passing a PerFieldAnalyzerWrapper instance as the
analyzer to MFQP? Worth a try.
--
Ian.
On Wed, Jun 8, 2011 at 2:38 PM, Erick Erickson wrote:
> Could you just construct a BooleanQuery with the
> term
Could you just construct a BooleanQuery with the
terms against different fields instead of using MFQP?
e.g.
bq.add(qp.parse("title:(the AND project)", SHOULD))
bq.add(qp.parse("desc:(the AND project)", SHOULD))
etc...? If your QueryParser was created with a
PerFieldAnalyzerWrapper I think you mig
I guess the base problem is that MFQP only accepts one analyzer.
Presumably you are using different analyzers for your title and desc
fields, and it might do what you wanted if you could pass in a list of
analyzers along with a list of fields. Sounds like something that
might not be too hard to co
>
> Why don't you use the parse method without the flags?
>
> public static Query parse(Version matchVersion, String[] queries,
> String[] fields,
> Analyzer analyzer) throws ParseException
>
Thank you for the suggestion Simon.
However the point is that I want to apply one query as opposed to
On Thu, Oct 14, 2010 at 3:04 AM, Lev Bronshtein
wrote:
>
> Hi Group,
>
> I have an isue when using MultiFieldQueryParser, I would like to use one
> query against a number of fields however I get an
> java.lang.IllegalArgumentException: queries.length != fields.length
>
> Looked at the javadoc, an
Perhaps you met this issue which I have already reported?
https://issues.apache.org/jira/browse/LUCENE-2518
Itamar.
On 14/10/2010 3:40 AM, Erick Erickson wrote:
I'm not quite sure what you mean by "run a query against multiple fields".
But would
creating your own BooleanQuery where each claus
I'm not quite sure what you mean by "run a query against multiple fields".
But would
creating your own BooleanQuery where each clause was the parsed result
against
a specific field work?
If this is irrelevant, could you give a couple of examples of what you're
looking to
accomplish?
Best
Erick
O
Hey guys: original poster here, and I found a solution! I created a wrapper
that could accept multiple analyzers and then combined them into a search:
here is the code.
--wrapper class-
public class PositionalPorterStopAnalyzer extends Analyzer {
private Set stopWords;
//www.thetaphi.de
> eMail: u...@thetaphi.de
>
> > -Original Message-
> > From: Erick Erickson [mailto:erickerick...@gmail.com]
> > Sent: Friday, May 01, 2009 11:42 PM
> > To: java-user@lucene.apache.org
> > Subject: Re: MultiFieldQueryParser
.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de
> -Original Message-
> From: Erick Erickson [mailto:erickerick...@gmail.com]
> Sent: Friday, May 01, 2009 11:42 PM
> To: java-user@lucene.apache.org
> Subject: Re: MultiFieldQueryParser - us
This looks like a job for PerFieldAnalyzerWrapper, no
MultiFieldQueryparser required
Best
Erick
On Fri, May 1, 2009 at 3:33 PM, theDude_2 wrote:
>
> Hello fellow Lucene developers!
>
> I have a bit of a question - and I can't find the answer in my lucene
> book
>
> Im trying to crea
Hey,
Thanks a lot! Everything works pretty well :-) .
Greetings
Jens
Donna L Gresh wrote:
>
> Paul-
> Thanks (that was one of my ulterior motives for answering the question; I
> figured if there was something inefficient or unnecessary about my
> approach, I'd hear about it :) )
>
> Donna
Paul-
Thanks (that was one of my ulterior motives for answering the question; I
figured if there was something inefficient or unnecessary about my
approach, I'd hear about it :) )
Donna Gresh
Paul Elschot <[EMAIL PROTECTED]> wrote on 02/29/2008 01:42:57 PM:
> Op Friday 29 February 2008 18:04:
Op Friday 29 February 2008 18:04:47 schreef Donna L Gresh:
> I believe something like the following will do what you want:
>
> QueryParser parserTitle = new QueryParser("title", analyzer);
> QueryParser parserAuthor = new QueryParser("author", analyzer);
>
> BooleanQuery overallquery = new BooleanQ
I believe something like the following will do what you want:
QueryParser parserTitle = new QueryParser("title", analyzer);
QueryParser parserAuthor = new QueryParser("author", analyzer);
BooleanQuery overallquery = new BooleanQuery();
BolleanQuery firstQuery = new BooleanQuery();
Query q1= pars
: Subject: MultiFieldQueryParser question
: Date: Fri, 8 Feb 2008 14:53:37 -
: Message-ID:
: <[EMAIL PROTECTED]>
: In-Reply-To: <[EMAIL PROTECTED]>
http://people.apache.org/~hossman/#threadhijack
Thread Hijacking on Mailing Lists
When starting a new discussion on a mailing list, please
Solved it, for those who were wondering where I went wrong
I've built up an ArrayList while adding my attributes to a lucence doc
and updated my multiquerySearchParser to contain all these attribute
names as follows
Object[] attributeNamesArray = (Object[]) attrList.toArray();
String[
cts later on in my code.
-Original Message-
From: Daniel Naber [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 19, 2006 4:06 PM
To: java-user@lucene.apache.org
Subject: Re: MultiFieldQueryParser doesn't properly filter out documents when
the query string specifies to exclude cert
My first question is how many documents would you be deleting on a pass for
option 2? If it's 10 documents out of 10,000, I'd consider just deleting
them and re-adding (see IndexModifier).
Personally, if posible, I prefer your first option, building a completely
new index and switching between th
Hello Gentlemen (+Ladies?),
I'm integrating Lucene into a Spring web-app, and have found a plethora of
great web + print resources to make the integration quick and seamless. One
thing that I have been hard-pressed to find is a good solution for rebuilding
the index on a regular basis.
I'm
On Tuesday 19 December 2006 23:05, Scott Sellman wrote:
> new
> BooleanClause.Occur[]{BooleanClause.Occur.SHOULD,
> BooleanClause.Occur.SHOULD}
Why do you explicitly specify these operators?
> q.add(keywordQuery, BooleanClause.Occur.MUST); //true, false);
You seem to wra
: Well, as always, it depends ... My first thought is that I'd index things
: in separate fields as it gives you more options. For instance, let's say
: that you have name and phone fields and decide that the name field is more
: important than the phone number. Your options for boosting "anything
Well, as always, it depends ... My first thought is that I'd index things
in separate fields as it gives you more options. For instance, let's say
that you have name and phone fields and decide that the name field is more
important than the phone number. Your options for boosting "anything in the
It's the Analyzer you're passing into the QueryParser.
StandardAnalyzer turns "C++" into "c". You can change the .jj grammar
to fix this. (same for "C#")
On 6/14/06, Joe Amstadt <[EMAIL PROTECTED]> wrote:
I'm trying to do a search on ( Java PHP C++ ) with
lucene 1.9. I am using a MultiFieldQu
How to boost it at indexing time?
From: Otis Gospodnetic <[EMAIL PROTECTED]>
Reply-To: java-user@lucene.apache.org
To: java-user@lucene.apache.org
Subject: Re: MultiFieldQueryParser Problems about how to give the fields
weight
Date: Wed, 11 May 2005 12:44:12 -0700 (PDT)
If you think c
If you think content field is more important, you could boost it at
indexing time. If you want to boost at search time, and you are using
QueryParser, you could just use the term^float syntax. I think what
you have down there is ok, too, but I suppose you'd need an if/else so
you boost only the c
37 matches
Mail list logo