Hi,
Never done in myself, but from the doc :
>From the query (
https://lucene.apache.org/core/8_6_3/core/org/apache/lucene/search/Query.html),
you can retrieve the Weight (
https://lucene.apache.org/core/8_6_3/core/org/apache/lucene/search/Weight.html),
from which you can access the Matches (
http
Problem: I have indexed the filepath and the content of thousands of
documents and can successfully query the index on the text to return a
collection of filepaths. Now I need to create a collection of the tokens in
the index which matched the query.
I can see that there are solutions to a rela
I have a numeric range query to perform in an index. I begin by indexing a
document with a field value of "300". When I search for a range [100 TO 400] I
get results from the search operation. Strangely enough, when I search for [100
TO 4000], I don't get any search results.
Here is a code sni
Hi Jack,
Thanks a lot for your suggestion.
Regards,
Sandeep
On Tue, Mar 8, 2016 at 8:32 PM, Jack Krupansky
wrote:
> BooleanQuery can be nested, so you do a top-level BQ that has two clauses,
> the first a TQ for a:x and the second another BQ that itself has two
> clauses, both SHOULD.
>
> -- J
BooleanQuery can be nested, so you do a top-level BQ that has two clauses,
the first a TQ for a:x and the second another BQ that itself has two
clauses, both SHOULD.
-- Jack Krupansky
On Tue, Mar 8, 2016 at 4:38 AM, sandeep das wrote:
> Hi,
>
> I'm using lucene-5.2.0 and in query interface I wi
Hi,
I'm using lucene-5.2.0 and in query interface I wish to compose a query
like
"a=x and (b=y or d=z)"
Which can be described as If any document has value "x" for field "a" and
field "b" has value "y" or field "d" has value "z" then that document
should be chosen. There are three fields in my d
On Fri, Sep 18, 2015 at 1:14 AM, Ziqi Zhang wrote:
=>
> So my question is, how can I achieve the same by using the Lucene API, not
> solr? I looked into the org.apache.solr.handler.component.TermsComponent
> class but it is not very obvious for me.
org.apache.lucene.search.RegexpQuery.
Or, if yo
Hi
I am using the TermsComponent in my solr config like this to deal with
queries about terms in the index:
--
true
false
terms
---
For example, I want to fetch any *terms* containing "surface defects".
Using solr I can d
_args[1]);
> }
> }
>
>
> On Thu, Oct 3, 2013 at 4:10 PM, VIGNESH S wrote:
> > Hi,
> >
> > sorry.. thats my typo..
> >
> > Its not failing because of that
> >
> >
> > On Thu, Oct 3, 2013 at 8:17 PM, Ian Lea wrote:
> >
();
t.test(_args[0], _args[1]);
}
}
On Thu, Oct 3, 2013 at 4:10 PM, VIGNESH S wrote:
> Hi,
>
> sorry.. thats my typo..
>
> Its not failing because of that
>
>
> On Thu, Oct 3, 2013 at 8:17 PM, Ian Lea wrote:
>
>> Are you sure it's not failing because
t; > Hi,
> >
> > I am Trying to do Multiphrase Query in Lucene 4.3. It is working Perfect
> > for all scenarios except the below scenario.
> > When I try to Search for a phrase which is preceded by any punctuation,it
> > is not working..
> >
> > Text
Are you sure it's not failing because "adhoc" != "ad-hoc"?
--
Ian.
On Thu, Oct 3, 2013 at 3:07 PM, VIGNESH S wrote:
> Hi,
>
> I am Trying to do Multiphrase Query in Lucene 4.3. It is working Perfect
> for all scenarios except the below scenario.
> Wh
Hi,
I am Trying to do Multiphrase Query in Lucene 4.3. It is working Perfect
for all scenarios except the below scenario.
When I try to Search for a phrase which is preceded by any punctuation,it
is not working..
TextContent: Dremel is a scalable, interactive ad-hoc query system for
analysis
of
>>> >> Romer".But
>> >>> >> > When i do a Search,it is not returning Hits.This Problem I am
>> facing
>> >>> is
>> >>> >> not
>> >>> >> > for all phrases
>> >>> >> > Th
y it is not able to find "geoffrey". I confirmed
> >>> this
> >>> >> by
> >>> >> > doing trm.seekCeil(new BytesRef("Geoffrey")) and then and then
> when
> >>> i
> >>> >> > do String s = trm.term().u
>> >> > instead of geoffrey.seekceil is working properly for many phrases
>>> though.
>>> >> >
>>> >> > What could be the problem..please kindly suggest.
>>> >> >
>>> >> >
>>> >> >
>&
the problem..please kindly suggest.
>> >> >
>> >> >
>> >> >
>> >> > On Fri, Sep 27, 2013 at 6:58 PM, Allison, Timothy B. <
>> talli...@mitre.org
>> >> >wrote:
>> >> >
>> >>
; >> >> 1) An alternate method to your original question would be to do
> >> something
> >> >> like this (I haven't compiled or tested this!):
> >> >>
> >> >> Query q = new PrefixQuery(new Term("field", &quo
;> q.extractTerms(terms);
>> >> Term[] arr = terms.toArray(new Term[terms.size()]);
>> >> MultiPhraseQuery mpq = new MultiPhraseQuery();
>> >> mpq.add(new Term("field", "microsoft");
>> >> mpq.add(arr);
>> >>
>>
.toArray(new Term[terms.size()]);
> >> MultiPhraseQuery mpq = new MultiPhraseQuery();
> >> mpq.add(new Term("field", "microsoft");
> >> mpq.add(arr);
> >>
> >>
> >> 2) At a higher level, do you need to generate your query
> pro
d.parser.QueryParser
>> c) experimental:
>> http://issues.apache.org/jira/browse/LUCENE-5205
>>
>>
>> -Original Message-
>> From: VIGNESH S [mailto:vigneshkln...@gmail.com]
>> Sent: Friday, September 27, 2013 3:33 AM
>> To: java-user@lucene.apache.or
ComplexPhraseQueryParser
> b) SurroundQueryParser: oal.queryparser.surround.parser.QueryParser
> c) experimental:
> http://issues.apache.org/jira/browse/LUCENE-5205
>
>
> -Original Message-
> From: VIGNESH S [mailto:vigneshkln...@gmail.com]
> Sent: Friday, September
lexPhraseQueryParser
b) SurroundQueryParser: oal.queryparser.surround.parser.QueryParser
c) experimental: http://issues.apache.org/jira/browse/LUCENE-5205
-Original Message-
From: VIGNESH S [mailto:vigneshkln...@gmail.com]
Sent: Friday, September 27, 2013 3:33 AM
To: java-user@lucene.apache
Hi,
The word i am giving is "Romer Geoffrey ".The Word is in the Field.
trm.seekCeil(new BytesRef("Geoffrey")) and then when i do String s =
trm.term().utf8ToString(); and hence
It is giving a diffrent word..I think this is why my multiphrasequery is
not giving desired results.
What may be the
Hi Lan,
Thanks for your Reply.
I am doing similar to this only..In MultiPhraseQuery object actual phrase
is going proper but it is not returning any hits..
In Lucene 3.6,I implemented the same logic and it is working.
In Lucene 4.3,I implemented the Index for that using
FieldType offsetsType
I use the code below to do something like this. Not exactly what you
want but should be easy to adapt.
public List findTerms(IndexReader _reader,
String _field) throws IOException {
List l = new ArrayList();
Fields ff = MultiFields.getFields(_reader);
Terms tr
Hi,
In the Example of Multiphrase Query it is mentioned
"To use this class, to search for the phrase "Microsoft app*" first use
add(Term) on the term "Microsoft", then find all terms that have "app" as
prefix using IndexReader.terms(Term), and use MultiPhraseQuery.add(Term[]
terms) to add them to
Hi,
The behavior is expected with stemming.
Have you tried using StandardAnalyzer which do not do stemming?
--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com
On 9. mai 2012, at 08:12, Yogesh patel wrote:
> I am using Lucene and i hav
I am using Lucene and i have one question about it
I am using Snowball analyzer with English version.
My index has below columns
(1) id
(2) Content
i.e
Id Content
_
1 This is murder case and murdering is crime
2 The wife of a Mumbai
ram88||';'||mv.c_param89||';'||mv.c_param90||';'||mv.c_param91||';'||mv.c_param92||';'||mv.c_param93||';'||mv.c_param94||';'||mv.c_param95||';'||mv.c_param96||';'||mv.c_param97||';'||mv.c_param98||
7;||mv.c_param84||';'||mv.c_param85||';'||mv.c_param86||';'||mv.c_param87||';'||mv.c_param88||';'||mv.c_param89||';'||mv.c_param90||';'||mv.c_param91||';'||mv.c_param92||';'||mv.c_param93||';'||mv.c_pa
27;||mv.c_param87||';'||mv.c_param88||';'||mv.c_param89||';'||mv.c_param90||';'||mv.c_param91||';'||mv.c_param92||';'||mv.c_param93||';'||mv.c_param94||';'||mv.c_param95||';'||mv.c_param96||';'||mv.c_param
ram94||';'||mv.c_param95||';'||mv.c_param96||';'||mv.c_param97||';'||mv.c_param98||';'||mv.c_param99||';'||mv.c_param100||';'
> FROM MyTable mv
>
> *=Step2*: search the view with LIKE '%keyword%'
>
> SELECT *
> FROM V_MY_VIEW wcv
> WHERE wcv.content LIKE '%keyword%'
>
> Finally, it works nice, but inefficiency, almost cost 5~7 seconds. cos ONE
> MILLION rows are tooo huge.
>
> *Lucene way:*
>So, I use the Lucene to store these ONE MILLION data,
> code:document.add(new Field("content", content, Store.YES,
> Index.ANALYZED));//variable content, is the strings which jointed from the
> 100 columns
> The problem is that: if some keyword is not a word or a term, the
> search will return nothing.
> Usually, the keyword would be a person's name or some jargon, like
> 'catstiger.amber','amin.ahmad','fund-in-trust'.
> and 'catstiger.amber' can't be split into a term to save in the index store
>Cos, the Index.ANALYZED would fail to recognition the keyword as a term
> , so there is no such index at all.
> So, In short, is there any "Query" in Lucene can search the term, which is
> similar as "SQL-LIKE"?
>
>This SQL-function will meet the purpose:
>
> SELECT * FROM luceneDB ldb
> WHERE ldb.content *LIKE* '%keyword%'
>
> Thank you very much.
>
> Regards,
> Mead
>
v.c_param89||';'||mv.c_param90||';'||mv.c_param91||';'||mv.c_param92||';'||mv.c_param93||';'||mv.c_param94||';'||mv.c_param95||';'||mv.c_param96||';'||mv.c_param97||';'||mv.c_param98||';'||mv.c_p
#x27;;'||mv.c_param92||';'||mv.c_param93||';'||mv.c_param94||';'||mv.c_param95||';'||mv.c_param96||';'||mv.c_param97||';'||mv.c_param98||';'||mv.c_param99||';'||mv.c_param100||';'
FROM MyTable mv
*=Step2*
gt; -Yonik
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Query-in-Lucene-2.3.0-tp151
On Feb 3, 2008 11:44 AM, ajay_garg <[EMAIL PROTECTED]> wrote:
> Firstly, in the 2.3 optimizations, point 4 says ::
> " 4. LUCENE-959: Remove synchronization in Document (yonik)".
>
> Well, what does that mean, since it has already been assured that multiple
> adds, deletes, updates CAN be done by m
;>>>> has a single write.lock, this means that sitting on the CPU, we
>>>>>> observe
>>>>>> that
>>>>>> at a particular instant, only a single thread is using the CPU,
>>>>>
>>>>> The write.lock is to protect
le
CPUs.
-Yonik
---
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
View this message in context: http://www.nabble.com/Query-in-
Lucene-2.3.0-tp15175141p15198783.html
Sent from the Lucene - Java Users mailing list archive
r instances,
>>> *not* against other threads.
>>> Using multiple threads on a single IndexWriter should utilize
>>> multiple
>>> CPUs.
>>>
>>> -Yonik
>>>
>>> --
eads on a single IndexWriter should utilize
multiple
CPUs.
-Yonik
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
View this message in context: http://www.nabble.com/Query-i
ainst other threads.
> Using multiple threads on a single IndexWriter should utilize multiple
> CPUs.
>
> -Yonik
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail
On Jan 30, 2008 10:59 PM, ajay_garg
<[EMAIL PROTECTED]> wrote:
>
> Thanks Mike for your directions.
>
> Yes, I am in fact using a single computer for my application, and your
> saying that in this case, multiple threads with a single IndexWriter wll
> give a better performance. Hmmm. I just wonder
memory at our disposal, before we are sure that there
>> will be no
>> "outOfMemoryException" ? If
>> that is the case, does that also mean that if we are
>> working with a
>> single main thread only, and
>> providing anything l
ry at our disposal, before we are sure that there
will be no
"outOfMemoryException" ? If
that is the case, does that also mean that if we are
working with a
single main thread only, and
providing anything less than 16MB of memory to the JVM,
then the
exception would
less than 16MB of memory to the JVM, then the
exception would always occur ?
--
View this message in context:
http://www.nabble.com/Query-in-Lucene-2.3.0-tp15175141p15175141.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
When in doubt, WhitespaceAnalyzer is the most predictable. Note that
it doesn't lower-case the tokens though. Depending upon your
requirements, you can always pre-process your query and indexing
streams and do your own lowercasing and/or character stripping.
You can always create your own analyze
Witch analyser I have to use to find text like this ''?
48 matches
Mail list logo