RE: MultiFieldQueryParser on integer and string (8.6.0)

2020-11-24 Thread Karthick Sundaram
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

Re: MultiFieldQueryParser on integer and string (8.6.0)

2020-11-24 Thread Nicolás Lichtmaier
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 ap

Re: MultiFieldQueryParser on integer and string (8.6.0)

2020-10-09 Thread Stephane Passignat
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

MultiFieldQueryParser on integer and string (8.6.0)

2020-10-08 Thread Stephane Passignat
"21"))); doc.add(new DoublePoint("DoublePoint", new Double(37.7))); doc.add(new StringField("Date", "20200615", Field.Store.YES)); writer.addDocument(doc); writer.commit(); } } private void query(Directory index, QueryPars

How does MultiFieldQueryParser work? Any example showing its mechanism please

2018-08-24 Thread baris . kazar
Hi,- i am trying to understand what this api does and it seems it decomposes the input string by spaces and OR's them and then depending on occur field setting the whole OR'ed expression is either under "+" (i.e,must) or just OR'ed again. Such as: input string abc def occur values are : m

does $ mean something in Lucene index and MultiFieldQueryParser

2018-07-18 Thread baris . kazar
It seems in my query string i cant see $ when print it out from MultiFieldQueryParser but the search string has $ in it and it finds hits. On the other hand, Termquery based BooleanQuery keeps $ and no hits. i use $ for starts with effect. Best regards

MultiFieldQueryParser over Analyzer

2018-01-22 Thread Chitra
Hi Team, I have a doubt on parsing a query using MultiFieldQueryParser over StandardAnalyzer. searchWord: abc.def_...@global-international.com while performing a search using the code, Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_40, new > StringRea

Fwd: Wildcard query parser of MultiFieldQueryParser should support boosts

2017-08-17 Thread Yegor Dovganich
Hello, can someone review my patch? https://issues.apache.org/jira/browse/LUCENE-7917 -- Regards, Yegor Dovganich - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h..

Re: Assert / NPE using MultiFieldQueryParser

2013-03-25 Thread Simon Willnauer
27;ve obviously seen (and fixed!) the issue already, >> > but for the record: https://issues.apache.org/jira/browse/LUCENE-4878 >> > >> > Adam >> > >> > -Original Message- >> > From: Simon Willnauer [mailto:simon.willna...@gmail.com] >> &

Re: Assert / NPE using MultiFieldQueryParser

2013-03-25 Thread Erick Erickson
ail.com] > > Sent: Sunday, March 24, 2013 9:28 AM > > To: java-user@lucene.apache.org > > Subject: Re: Assert / NPE using MultiFieldQueryParser > > > > Hey, > > > > this is in-fact a bug in the MultiFieldQueryParser, can you open a > ticket for this please i

Re: Assert / NPE using MultiFieldQueryParser

2013-03-25 Thread Simon Willnauer
r > the record: https://issues.apache.org/jira/browse/LUCENE-4878 > > Adam > > -Original Message- > From: Simon Willnauer [mailto:simon.willna...@gmail.com] > Sent: Sunday, March 24, 2013 9:28 AM > To: java-user@lucene.apache.org > Subject: Re: Assert / NPE using Mult

RE: Assert / NPE using MultiFieldQueryParser

2013-03-25 Thread Adam Rauch
-user@lucene.apache.org Subject: Re: Assert / NPE using MultiFieldQueryParser Hey, this is in-fact a bug in the MultiFieldQueryParser, can you open a ticket for this please in our bugtracker? MultifieldQueryParser should override getRegexpQuery but it doesn't simon On Sun, Mar 24, 2013 at 3:57 PM,

Re: Assert / NPE using MultiFieldQueryParser

2013-03-24 Thread Simon Willnauer
Hey, this is in-fact a bug in the MultiFieldQueryParser, can you open a ticket for this please in our bugtracker? MultifieldQueryParser should override getRegexpQuery but it doesn't simon On Sun, Mar 24, 2013 at 3:57 PM, Adam Rauch wrote: > I'm using MultiFieldQueryParser to

Assert / NPE using MultiFieldQueryParser

2013-03-24 Thread Adam Rauch
I'm using MultiFieldQueryParser to parse search queries. I find that certain query strings (e.g., "/study/" without the quotes) cause MultiFieldQueryParser.parse() to throw an AssertionError, if asserts are enabled. In production, parse() returns a Query, but it seems to be corru

Re: Performance of MultiFieldQueryParser versus QueryParser

2012-03-02 Thread Ian Lea
Highly unlikely unless your subclass was slow for some reason. -- Ian. On Fri, Mar 2, 2012 at 7:31 AM, Paul Taylor wrote: > If I happen to subclass MultiFieldQueryParser unneccessarily (thought need > more than one default search but don't after all) would it  have any impact >

Performance of MultiFieldQueryParser versus QueryParser

2012-03-01 Thread Paul Taylor
If I happen to subclass MultiFieldQueryParser unneccessarily (thought need more than one default search but don't after all) would it have any impact on performance ? thanks Paul - To unsubscribe, e-mail: java

Re: MultiFieldQueryParser with default AND and stopfilter

2011-06-09 Thread Elmer
che.lucene.queryParser.MultiFieldQueryParser; import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.search.BooleanClause; import org.apache.lucene.search.BooleanClause.Occur; import org.apache.lucene.search.Query; import org.apache.lucene.util.Version; /** * @author Elmer van Chastelet *

Re: MultiFieldQueryParser with default AND and stopfilter

2011-06-08 Thread Trejkaz
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

Re: MultiFieldQueryParser with default AND and stopfilter

2011-06-08 Thread Ian Lea
t; 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. >> >> > >> >

Re: MultiFieldQueryParser with default AND and stopfilter

2011-06-08 Thread Elmer
; > analyzer to MFQP? Worth a try. > >> > > >> > > >> > -- > >> > Ian. > >> > > >> > > >> > On Wed, Jun 8, 2011 at 2:38 PM, Erick Erickson > >> > wrote: > >> > > Could you just constr

Re: MultiFieldQueryParser with default AND and stopfilter

2011-06-08 Thread Ian Lea
t; > wrote: >> > > 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)) >> > > b

Re: MultiFieldQueryParser with default AND and stopfilter

2011-06-08 Thread Elmer
38 PM, Erick Erickson > > wrote: > > > 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

Re: MultiFieldQueryParser with default AND and stopfilter

2011-06-08 Thread Elmer
FieldAnalyzerWrapper I think you might get what you > > want > > > > Note, bad pseudo code there... > > > > Best > > Erick > > > > On Wed, Jun 8, 2011 at 4:52 AM, Elmer wrote: > >> Hi, > >> > >> I have a use case in whi

Re: MultiFieldQueryParser with default AND and stopfilter

2011-06-08 Thread Erick Erickson
code there... >> >> Best >> Erick >> >> On Wed, Jun 8, 2011 at 4:52 AM, Elmer wrote: >>> Hi, >>> >>> I have a use case in which I use the MultiFieldQueryParser (MFQP) on >>> some fields that use and some fields that don't use a stopfilter. The

Re: MultiFieldQueryParser with default AND and stopfilter

2011-06-08 Thread Ian Lea
you might get what you > want > > Note, bad pseudo code there... > > Best > Erick > > On Wed, Jun 8, 2011 at 4:52 AM, Elmer wrote: >> Hi, >> >> I have a use case in which I use the MultiFieldQueryParser (MFQP) on >> some fields that use and som

Re: MultiFieldQueryParser with default AND and stopfilter

2011-06-08 Thread Erick Erickson
rWrapper I think you might get what you want Note, bad pseudo code there... Best Erick On Wed, Jun 8, 2011 at 4:52 AM, Elmer wrote: > Hi, > > I have a use case in which I use the MultiFieldQueryParser (MFQP) on > some fields that use and some fields that don't use a stopfilte

Re: MultiFieldQueryParser with default AND and stopfilter

2011-06-08 Thread Ian Lea
code, although there may be complications and catches that I haven't thought of. You can pass an analyzer to the parse() methods therefore could perhaps have something like BooleanQuery bq = new BooleanQuery(); MultiFieldQueryParser mfqp = new ...(...); Query q1 = mfqp.parse(... title-type-f

MultiFieldQueryParser with default AND and stopfilter

2011-06-08 Thread Elmer
Hi, I have a use case in which I use the MultiFieldQueryParser (MFQP) on some fields that use and some fields that don't use a stopfilter. The default operator of the MFQP is set to AND. For example, if the search query is 'the project' (with 'the' included in the stopli

RE: lucene 3.0.3 | QueryParser | MultiFieldQueryParser

2011-04-27 Thread Steven A Rowe
Ranjit, The problem is definitely the analyzer you are passing to QueryParser or MultiFieldQueryParser, and not the parser itself. The following tests succeed using KeywordAnalyzer, which is a pass-through analyzer (the output is the same as the input): public void testSharpQP() throws

Re: lucene 3.0.3 | QueryParser | MultiFieldQueryParser

2011-04-27 Thread Ranjit Kumar
.net I need to use MultiFieldQueryParser to get correct result(document). Then Parser stripping off # but do not dot(.) so query became c AND .net Also, I have made changes for c#.net, vb.net, .net all these work properly with MultiFieldQueryParser except c# Thanks & Regards, Ranjit K

Re: lucene 3.0.3 | QueryParser | MultiFieldQueryParser

2011-04-26 Thread haichengyl
hope to sent some detail about it. 2011-04-26 haichengyl 发件人: Ranjit Kumar 发送时间: 2011-04-26 21:55:04 收件人: java-user-h...@lucene.apache.org; java-user@lucene.apache.org 抄送: 主题: lucene 3.0.3 | QueryParser | MultiFieldQueryParser Hi, I have created my own custom analyzer and uses

Re: lucene 3.0.3 | QueryParser | MultiFieldQueryParser

2011-04-26 Thread haichengyl
help to give some detail info 2011-04-26 haichengyl 发件人: Ranjit Kumar 发送时间: 2011-04-26 21:55:04 收件人: java-user-h...@lucene.apache.org; java-user@lucene.apache.org 抄送: 主题: lucene 3.0.3 | QueryParser | MultiFieldQueryParser Hi, I have created my own custom analyzer and uses jFlex

RE: lucene 3.0.3 | QueryParser | MultiFieldQueryParser

2011-04-26 Thread Steven A Rowe
(<_TERM_CHAR>)* > Are you sure that your custom JFlex Analyzer is not being given 'C#' and then stripping off the '#'? You could work around this issue by pre-processing your query (and your documents) to replace C# with csharp or something like it that would not be

lucene 3.0.3 | QueryParser | MultiFieldQueryParser

2011-04-26 Thread Ranjit Kumar
MultiFieldQueryParser but it also do the same. Any help or suggestion will be appreciated!!! Thanks & Regards, Ranjit Kumar === Private, Confidential and Privileged. This e-mail and any files

Re: Using Fuzzysearch with MultiFieldQueryParser

2011-03-25 Thread Deepak Konidena
FuzzyQuery(...),. ...); >etc > >See BooleanClause.Occur for options on MUST, SHOULD etc. > > >-- >Ian. > >On Thu, Mar 24, 2011 at 5:48 PM, Deepak Konidena > wrote: >> Hi, >> >> I am using MultiFieldQueryParser with a custom analyzer for parsing >>searc

Re: Using Fuzzysearch with MultiFieldQueryParser

2011-03-25 Thread Ian Lea
> > I am using MultiFieldQueryParser with a custom analyzer for parsing search > text. > > Now,  when I say > > MultiFieldQueryParser qp = new MultiFieldQueryParser(Version,  new String[] > {"field1", "field2", "field3"}, customAnalyzer); >

Using Fuzzysearch with MultiFieldQueryParser

2011-03-24 Thread Deepak Konidena
Hi, I am using MultiFieldQueryParser with a custom analyzer for parsing search text. Now, when I say MultiFieldQueryParser qp = new MultiFieldQueryParser(Version, new String[] {"field1", "field2", "field3"}, customAnalyzer); qp.setDefaultOperator(QueryPars

Re: Re: How to do an all field search without using a "catchall" fieldor "MultiFieldQueryParser" ?

2011-03-17 Thread shrinath.m
On Thu, Mar 17, 2011 at 7:42 PM, Ian Lea [via Lucene] < ml-node+2693597-476158808-376...@n3.nabble.com> wrote: > if you go the MultiFieldQueryParser route you are going to need some > arrays. > Which other route can I take to do a all field search ? (Keeping in mind that I don

Re: Re: How to do an all field search without using a "catchall" fieldor "MultiFieldQueryParser" ?

2011-03-17 Thread Ian Lea
if you go the MultiFieldQueryParser route you are going to need some arrays. You specifically asked if you needed an array of BooleanClause.Occur and the answer to that specific question is still no. I can't tell you any more on this than you can get from reading the javadocs. -- Ian. O

Re: Re: How to do an all field search without using a "catchall" fieldor "MultiFieldQueryParser" ?

2011-03-17 Thread shrinath.m
FieldQueryParser.parse(Version.LUCENE_CURRENT, s, fields, flags, new StandardAnalyzer(Version.LUCENE_CURRENT, Collections.emptySet())); :( -- Regards Shrinath.M -- View this message in context: http://lucene.472066.n3.nabble.com/How-to-do-an-all-field-search-without-using-a-catchall-field-or-Mult

Re: Re: How to do an all field search without using a "catchall" fieldor "MultiFieldQueryParser" ?

2011-03-17 Thread Ian Lea
0.3... > http://lucene.apache.org/java/3_0_3/api/all/org/apache/lucene/queryParser/MultiFieldQueryParser.html > > <http://lucene.apache.org/java/3_0_3/api/all/org/apache/lucene/queryParser/MultiFieldQueryParser.html> > > > -- > Regards > Shrinath.M > > > --

Re: Re: How to do an all field search without using a "catchall" fieldor "MultiFieldQueryParser" ?

2011-03-17 Thread shrinath.m
Parser/MultiFieldQueryParser.html> -- Regards Shrinath.M -- View this message in context: http://lucene.472066.n3.nabble.com/How-to-do-an-all-field-search-without-using-a-catchall-field-or-MultiFieldQueryParser-tp2681163p2693226.html Sent from the Lucene - Java Users mailing list archive at Nabble.com.

Re: Re: How to do an all field search without using a "catchall" fieldor "MultiFieldQueryParser" ?

2011-03-17 Thread Ian Lea
.html>Look > at the parse method. > > -- > Regards > Shrinath.M > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/How-to-do-an-all-field-search-without-using-a-catch

Re: Re: How to do an all field search without using a "catchall" fieldor "MultiFieldQueryParser" ?

2011-03-17 Thread shrinath.m
rch-without-using-a-catchall-field-or-MultiFieldQueryParser-tp2681163p2693112.html Sent from the Lucene - Java Users mailing list archive at Nabble.com.

Re: Re: How to do an all field search without using a "catchall" fieldor "MultiFieldQueryParser" ?

2011-03-17 Thread Ian Lea
> I'd have to create a similarly sized array of Boolean.Occur too, isn't it? What for? > 1. Is that how SIREn implements it? No idea. > 2. Is that optimal solution if I'm going to have an index of a billion docs > with varying number of fields? Probably not. I always use a catchall field. I

RE:Re: How to do an all field search without using a "catchall" fieldor "MultiFieldQueryParser" ?

2011-03-15 Thread shrinath.m
ucene.472066.n3.nabble.com/How-to-do-an-all-field-search-without-using-a-catchall-field-or-MultiFieldQueryParser-tp2681163p2685072.html Sent from the Lucene - Java Users mailing list archive at Nabble.com.

Re: How to do an all field search without using a "catchall" field or "MultiFieldQueryParser" ?

2011-03-15 Thread Ian Lea
IndexReader.getFieldNames()? public abstract Collection getFieldNames(IndexReader.FieldOption fldOption) Use that to get indexed fields and pass that list to MultiFieldQueryParser. -- Ian. On Tue, Mar 15, 2011 at 10:46 AM, shrinath.m wrote: > Catchall field has its own disadvantages

How to do an all field search without using a "catchall" field or "MultiFieldQueryParser" ?

2011-03-15 Thread shrinath.m
Catchall field has its own disadvantages of increasing index size. MultiFieldQueryParser has to know the field names before hand. How do I do a multi field search - without knowing fields in the index - without having a CatchAll field PS : I went through the Lucene in Action book, and in

MultiFieldQueryParser

2010-10-25 Thread dan sutton
Hi, MultiFieldQueryParser($Revision: 965585) says that when you pass something like (title=>5 body=>10) you can get +(title:term1^5.0 body:term1^10.0) +(title:term2^5.0 body:term2^10.0), whereas what I have received is the following (with Version.LUCENE_40): +(title:term1 title:term

RE: MultiFieldQueryParser

2010-10-17 Thread Lev Bronshtein
> > 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

Re: MultiFieldQueryParser

2010-10-17 Thread Simon Willnauer
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 > &g

Re: MultiFieldQueryParser

2010-10-16 Thread Itamar Syn-Hershko
uery 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 On Wed, Oct 13, 2010 at 9:04 PM, Lev Bronshtein wrote: Hi Group, I have an isue when using MultiFieldQueryPar

Re: MultiFieldQueryParser

2010-10-13 Thread Erick Erickson
omplish? Best Erick On Wed, Oct 13, 2010 at 9:04 PM, 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

MultiFieldQueryParser

2010-10-13 Thread Lev Bronshtein
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, and it looks like the only way to run one query against multiple

Re: DisjunctionMaxQuery with tie breaker=1 same as MultiFieldQueryParser?

2010-03-18 Thread Chris Hostetter
: If I am just searching for a term, "ipod" in this case, how would be coord : computed? Would in this case coord(q,d) matter at all? (I understand that : not) in theory your SImilarity coord() function would be called to find out what hte coord value for "1 of 1" should be ... but in reallity T

Re: DisjunctionMaxQuery with tie breaker=1 same as MultiFieldQueryParser?

2010-03-12 Thread Marc Sturlese
xQuery with the tie braker = 1 > than > : to use a MultiFieldQueryParser with and OR to build the boolean queries? > > strictly speaking even with tie breaker of 1, a DisjuctionMaxQuery differs > from a BooleanQuery in the details of how the score is calculated when a > doc

Re: DisjunctionMaxQuery with tie breaker=1 same as MultiFieldQueryParser?

2010-03-11 Thread Chris Hostetter
: If I want to search let's say "ipod" in three different fields (device, : sound,technology) : Would be the same to use a DisjunctionMaxQuery with the tie braker = 1 than : to use a MultiFieldQueryParser with and OR to build the boolean queries? strictly speaking even with tie

DisjunctionMaxQuery with tie breaker=1 same as MultiFieldQueryParser?

2010-03-11 Thread Marc Sturlese
Hey there, If I want to search let's say "ipod" in three different fields (device, sound,technology) Would be the same to use a DisjunctionMaxQuery with the tie braker = 1 than to use a MultiFieldQueryParser with and OR to build the boolean queries? As far as I unders

Retrieving field information for each hit when using "MultiFieldQueryParser"

2010-02-03 Thread prashant ullegaddi
Hi, I'm using MultiFieldQueryParser to search over different fields of documents in the index. Whenever I get a hit for a query, is it possible to know in which field the query match occurred? And is it possible to retrieve the field(s) for each hit? To make things clearer, suppose I have

Re: Is there any difference between using QueryParser and MultiFieldQueryParser when have single default search field ?

2009-07-31 Thread Paul Taylor
Simon Willnauer wrote: This would not make much of a difference. I would guess that you have one additional "wrapping" boolean query if you use MultiFieldQueryParser. For query "foo AND bar" the MFQueryParser creates +(fname:foo) +(fname:bar) and QueryParser would create +fna

Re: Is there any difference between using QueryParser and MultiFieldQueryParser when have single default search field ?

2009-07-31 Thread prashant ullegaddi
In MultiFieldQueryParser, you can mention different fields of the document which can be searched for E.g. in contents of the document, if you index different fields such as URL, BOLD, ITALIC, you can search over all of them. Additionally, there is provision to boost a field over the other as well

Re: Is there any difference between using QueryParser and MultiFieldQueryParser when have single default search field ?

2009-07-31 Thread Simon Willnauer
This would not make much of a difference. I would guess that you have one additional "wrapping" boolean query if you use MultiFieldQueryParser. For query "foo AND bar" the MFQueryParser creates +(fname:foo) +(fname:bar) and QueryParser would create +fname:foo +fname:bar so in

Re: Is there any difference between using QueryParser and MultiFieldQueryParser when have single default search field ?

2009-07-31 Thread Ian Lea
I'd guess there wouldn't be any difference, but haven't tried it. Try it out and see what query.toString() says in each case. -- Ian. On Fri, Jul 31, 2009 at 1:37 PM, Paul Taylor wrote: > Is there any difference between using QueryParser and MultiFieldQueryParser > whe

Is there any difference between using QueryParser and MultiFieldQueryParser when have single default search field ?

2009-07-31 Thread Paul Taylor
Is there any difference between using QueryParser and MultiFieldQueryParser when have single default search field ? Depending on how many default search fields on an searching an index I select which of the two QueryParsers to use, but does it mater if I just use MultiFIeldQueryParser all the

Strange(?) behaviour using MultiFieldQueryParser

2009-07-21 Thread Philip Puffinburger
We have code (using Lucene 2.4.1) that will build a query that looks like: fielda:"ruz an"~2 OR fieldb:"ruz an"~2 OR fieldc:"ruz an"~2 When passed to a MultiFieldQueryParser and parsed it comes back looking like: fielda:"ruz an"~2 fieldb:"ru

Re: MultiFieldQueryParser - using a different analyzer per field...

2009-05-04 Thread theDude_2
ddAnalyzer("Field_2", new PositionalPorterStopAnalyzer()); mfqp = new MultiFieldQueryParser( fields, pfawBoth, boosts); ---

Re: MultiFieldQueryParser - using a different analyzer per field...

2009-05-01 Thread Erick Erickson
ng that searches both fields > with different analyzers. For searching more than one field at once, he can > use MultiFieldQueryParser, but not if the analyzer for both fields is > different (because the query string itself is also analyzed, but the two > different analyzers will pr

RE: MultiFieldQueryParser - using a different analyzer per field...

2009-05-01 Thread Uwe Schindler
Hi Erick, this is not what he wants to do, I think. He wants both things at once: One query string that searches both fields with different analyzers. For searching more than one field at once, he can use MultiFieldQueryParser, but not if the analyzer for both fields is different (because the

Re: MultiFieldQueryParser - using a different analyzer per field...

2009-05-01 Thread Erick Erickson
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.

MultiFieldQueryParser - using a different analyzer per field...

2009-05-01 Thread theDude_2
t I want a pure text match only, and for the other I want to use the stemming concept by using a custom made analyzer. Is there a way to do this? --This is what I am thinking (conceptually)-- MultiFieldQueryParser mfqp1 = new MultiFieldQueryParser(field1, new StandardAna

Boost factor in MultiFieldQueryParser

2009-02-15 Thread mitu2009
Hi, Can I boost different fields in MultiFieldQueryParser with different factors? Also, what is the maximum boost factor value I can assign to a field? Thanks a ton! Ed -- View this message in context: http://www.nabble.com/Boost-factor-in-MultiFieldQueryParser-tp22031092p22031092.html Sent

Re: Set a field as required in a MultiFieldQueryParser

2009-02-03 Thread Sylvain
'd want MUST between clauses (in which case MultiFieldQueryParser > seems unnecesary). That is, if your form is somethinng like > title: > description: > category: > > If you have them enter just a single term, that is your form looks > something like > word: > categor

Re: Set a field as required in a MultiFieldQueryParser

2009-02-01 Thread Erick Erickson
which case MultiFieldQueryParser seems unnecesary). That is, if your form is somethinng like title: description: category: If you have them enter just a single term, that is your form looks something like word: category: and want to form a query like (title:term OR description:term OR etc:term) AND category

Set a field as required in a MultiFieldQueryParser

2009-02-01 Thread Sylvain
that are in the given category and which match a part of the query must be returned. So I tried to use a MultiFieldQueryParser with SHOULD clauses on the title, description, etc and a MUST clause on the category field. It works pretty well but the problem is that _all_ the documents in the search

Re: Using PerFieldAnalyzerWrapper with KeywordAnalyzer - MultiFieldQueryParser

2009-01-13 Thread Erick Erickson
g all that, try peeling back your code. That is, use a very simple analyzer first on a single field then move up to MultiFieldQueryParser. Usually whenever I do this I wind up finding something silly Best Erick On Mon, Jan 12, 2009 at 6:02 PM, Michael Nguyen wrote: > Hi all, > >

Using PerFieldAnalyzerWrapper with KeywordAnalyzer - MultiFieldQueryParser

2009-01-12 Thread Michael Nguyen
fields = new string[] { "name", "keyword", "shortDescription" }; string strSearchTerm = "hello world"; PerFieldAnalyzerWrapper wrapper = new PerFieldAnalyzerWrapper(new StandardAnalyzer()); wrapper.AddAnalyzer("keyword", new KeywordAnalyzer())

Re: Using AND with MultiFieldQueryParser

2008-11-17 Thread Rafael Cunha de Almeida
yzer("nomeMunicipio", new > > SimpleBrazilianAnalyzer()); analyzer.addAnalyzer("nomeBairro", new > > SimpleBrazilianAnalyzer()); analyzer.addAnalyzer("logradouro", new > > SimpleBrazilianAnalyzer()); analyzer.addAnalyzer("textoComplementar", >

Re: Using AND with MultiFieldQueryParser

2008-11-17 Thread Rafael Cunha de Almeida
()); analyzer.addAnalyzer("nomeMunicipio", new > SimpleBrazilianAnalyzer()); analyzer.addAnalyzer("nomeBairro", new > SimpleBrazilianAnalyzer()); analyzer.addAnalyzer("logradouro", new > SimpleBrazilianAnalyzer()); analyzer.addAnalyzer("textoComplementar", > new SimpleB

Re: Using AND with MultiFieldQueryParser

2008-11-17 Thread Rafael Cunha de Almeida
yzer()); analyzer.addAnalyzer("nomeMunicipio", new SimpleBrazilianAnalyzer()); analyzer.addAnalyzer("nomeBairro", new SimpleBrazilianAnalyzer()); analyzer.addAnalyzer("logradouro", new SimpleBrazilianAnalyzer()); analyzer.addAnalyzer("textoComplementar", new SimpleBr

Re: Using AND with MultiFieldQueryParser

2008-11-13 Thread Matthew Hall
the stopword during index time you will never find any document matching your query. (this is expected behaviour) you can possibly use word1 OR stopword OR word2 (depends on what you want in the result) If you can clarify more about what you want in the result we can discuss on what can be done.

Re: Using AND with MultiFieldQueryParser

2008-11-13 Thread Rafael Cunha de Almeida
t you want in the result we can discuss on > what can be done. I wanted MultiFieldQueryParser to ignore any stopword the user may type in. In that particular case I'd like the result to be word1 AND word2. I thought that was what would happen because I pass the Analyzer to MultiFieldQuer

Re: Using AND with MultiFieldQueryParser

2008-11-13 Thread prabin meitei
TECTED]> wrote: > Hello, > > I used an Analyzer which removes stopwords when indexing, then I wanted > to do an AND search using MultiFieldQueryParser. So I did this: >word1 AND stopword AND word2 > I thought the stopword would be ignored by the searcher (I use the same >

Using AND with MultiFieldQueryParser

2008-11-12 Thread Rafael Cunha de Almeida
Hello, I used an Analyzer which removes stopwords when indexing, then I wanted to do an AND search using MultiFieldQueryParser. So I did this: word1 AND stopword AND word2 I thought the stopword would be ignored by the searcher (I use the same Analyzer to index and search). But instead, I

Re: Multi Field search without Multifieldqueryparser

2008-09-23 Thread Erick Erickson
gt;> -Grant > >>> > >>> > >>> On Sep 23, 2008, at 6:51 AM, Anshul jain wrote: > >>> > >>>> Here is what I'm trying to do: > >>>> > >>>> say a lucene document: > >>>> name: abc ^10 > &g

Re: Multi Field search without Multifieldqueryparser

2008-09-23 Thread Anshul jain
gt; Now what I want is that a text can be associated with more than one >>>> field. >>>> i.e. >>>> >>>> (field1,field2,field3):value >>>> name,(default_field),title: abc^10 >>>> organization,(default_field),institute: xyz^3 >

Re: Multi Field search without Multifieldqueryparser

2008-09-23 Thread Grant Ingersoll
nd searching mechanism for lucene, so that I can start working on it. The solution given by the java-users won't work for me as I do not want to add all the contents of the document in a single field and then search for that field, as this would increase the index size and I've to inde

RE: Multi Field search without Multifieldqueryparser

2008-09-23 Thread Dino Korah
eling that this might work. -Original Message- From: Umesh Prasad [mailto:[EMAIL PROTECTED] Sent: 23 September 2008 13:58 To: java-user@lucene.apache.org Subject: Re: Multi Field search without Multifieldqueryparser On Tue, Sep 23, 2008 at 5:28 PM, Grant Ingersoll <[EMAIL PROTECTE

Re: Multi Field search without Multifieldqueryparser

2008-09-23 Thread Umesh Prasad
ain the indexing and searching >> mechanism for lucene, so that I can start working on it. >> >> The solution given by the java-users won't work for me as I do not >> want to add all the contents of the document in a single field and >> then search for that field

Re: Multi Field search without Multifieldqueryparser

2008-09-23 Thread Erick Erickson
ndexing and searching > mechanism for lucene, so that I can start working on it. > > The solution given by the java-users won't work for me as I do not > want to add all the contents of the document in a single field and > then search for that field, as this would increase the

Re: Multi Field search without Multifieldqueryparser

2008-09-23 Thread Anshul jain
le to do so in lucene without changing the source? >> If no then can anyone please explain the indexing and searching >> mechanism for lucene, so that I can start working on it. >> >> The solution given by the java-users won't work for me as I do not >> want t

Re: Multi Field search without Multifieldqueryparser

2008-09-23 Thread Grant Ingersoll
ent in a single field and then search for that field, as this would increase the index size and I've to index more than 10 million documents. Also multifieldqueryparser will make it query execution inefficient, as there will be thousands of fields. If I start storing just a single field as: (def

Re: Multi Field search without Multifieldqueryparser

2008-09-23 Thread Anshul jain
x27;ve to index more than 10 million documents. Also multifieldqueryparser will make it query execution inefficient, as there will be thousands of fields. If I start storing just a single field as: (default_field): "name abc organization xyz", then it is possible that some other documen

Re: Multi Field search without Multifieldqueryparser

2008-09-22 Thread Erick Erickson
; > You will pay a penalty here, of bigger index and slower indexing. > > > > -Original Message- > > From: Anshul jain [mailto:[EMAIL PROTECTED] > > Sent: 21 September 2008 20:27 > > To: java-user@lucene.apache.org > > Subject: Multi Field search without

Re: Multi Field search without Multifieldqueryparser

2008-09-22 Thread Umesh Prasad
> So you pass "searchable-mash: George bush and president" to query parser. > > You will pay a penalty here, of bigger index and slower indexing. > > -Original Message- > From: Anshul jain [mailto:[EMAIL PROTECTED] > Sent: 21 September 2008 20:27 > To: java-u

RE: Multi Field search without Multifieldqueryparser

2008-09-22 Thread Dino Korah
to:[EMAIL PROTECTED] Sent: 21 September 2008 20:27 To: java-user@lucene.apache.org Subject: Multi Field search without Multifieldqueryparser Hi! I've a lucene document structured like: Field: Text name: George Bush Sex: Male Occupation: President of USA Now I can have two types of queries: Stru

Multi Field search without Multifieldqueryparser

2008-09-21 Thread Anshul jain
Hi! I've a lucene document structured like: Field: Text name: George Bush Sex: Male Occupation: President of USA Now I can have two types of queries: Structured query: name: George Bush AND Occupation: President Unstructured Query: George Bush AND President. After parsing it will become, value:

Highlighting results returned from MultiFieldQueryParser

2008-07-30 Thread syedfa
Dear fellow Lucene/Java developers: I have an index created from an XML file which I am trying to search using the MultiFieldQueryParser. At present, I am using the QueryParser to successfully return results that are highlighted. The code is listed here: public List search(File indexDir

Re: MultiFieldQueryParser - BooleanClause.Occur

2008-03-03 Thread JensBurkhardt
: >> > > Hey everybody, >> > > >> > > I read that it's possible to generate a query like: >> > > >> > > (title:term1 OR author:term1) AND (title:term2 OR author:term2) >> > > >> > > and so on. I also read that Bo

Re: MultiFieldQueryParser - BooleanClause.Occur

2008-02-29 Thread Donna L Gresh
elp me > > > handle > > > > this > > > > > problem. > > > But i have to admit that i totally don't understand how to use it. > > > If someone can explain or has a link to an explanation, this would > > > be terrific > > > &g

Re: MultiFieldQueryParser - BooleanClause.Occur

2008-02-29 Thread Paul Elschot
(title:term2 OR author:term2) > > > > and so on. I also read that BooleanClause.Occur should help me > > handle > > this > > > problem. > > But i have to admit that i totally don't understand how to use it. > > If someone can explain or has a link to

  1   2   >