Re: Lucene API to retrieve matched words

2018-09-06 Thread Mikhail Khludnev
Hello. What about MultiFields.getTerms().iterator().seekCeil(new BytesRef("ski")) ? On Thu, Sep 6, 2018 at 12:39 AM Mike Grishaber wrote: > Hello All, > > > > I am trying to find a way to retrieve a list of the words that matched a > query. I'm not looking for highlighting, just a list of the

Re: Lucene API to retrieve matched words

2018-09-05 Thread Michael Sokolov
If what you want is to undo the analysis and find text in the original document that was transformed into the terms that matched your query, that is what highlighters are for. Do you have a reason not to want to use the highlighters? On Wed, Sep 5, 2018, 5:39 PM Mike Grishaber wrote: > Hello All

Re: Lucene API to retrieve matched words

2018-09-05 Thread baris.kazar
Except TermQuery which does exact match, you can do * by appending star char. In Oracle Database Sql it is like the % char. Hope this helps Best > On Sep 5, 2018, at 5:38 PM, Mike Grishaber wrote: > > Hello All, > > > > I am trying to find a way to retrieve a list of the words that matched

Lucene API to retrieve matched words

2018-09-05 Thread Mike Grishaber
Hello All, I am trying to find a way to retrieve a list of the words that matched a query. I'm not looking for highlighting, just a list of the words. So if I search for 'ski' and I match on 'skier' and 'skiis', I would like to get back a list that includes 'skier' and 'skiis'. Is there an A

Re: how to write this SOLR query in LUCENE api?

2015-09-17 Thread Trejkaz
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.RegexpQu

how to write this SOLR query in LUCENE api?

2015-09-17 Thread Ziqi Zhang
solr I can do this: http://localhost:8983/solr/core1/terms?terms.fl=content&terms.regex=^(.*?(\bsurface%20defects\b)[^$]*)$&terms.sort=count&terms.limit=1 So my question is, how can I achieve the same by using the Lucene API, not s

Re: Lucene API

2012-11-05 Thread Vitaly Funstein
Term in my view is definitely not any more of a char buffer than a plain String. It's a unique permutation of a particular field name and its text value. If you look at its public API, the only way to mutate a Term instance is by obtaining a reference to underlying BytesRef which is in itself mutab

Re: Lucene API

2012-11-05 Thread Igal @ getRailo.org
it's CharTermAttribute in particular but since there are many such particular examples -- at some point it becomes Lucene in general. perhaps the problem is on my end that I'm not familiar enough with DSL-style, but learning DSL concepts is not a prerequisite for Lucene. as for the Term being

Re: Lucene API

2012-11-05 Thread Vitaly Funstein
Are you critiquing CharTermAttribute in particular, or Lucene in general? It appears CharTermAttribute is DSL-style builder API, just like its superinterface Appendable - does that not appear intentional and self-explanatory? Further, I believe Term instances are meant to be immutable hence no dire

Lucene API

2012-11-05 Thread Igal @ getRailo.org
I don't mean to sound critical, but is there a reason that the API is not simpler? for example, if I want to read/modify a CharTermAttribute's value, I need to use toString() to get the value, which is very unintuitive, and either copyBuffer() or setEmpty() and append(). is there a reason no

Re: Strange Problem ... Luke returns results Lucene api does not.

2006-02-16 Thread Mufaddal Khumri
Yes. thats exactly the problem. I just found out that analyzer was not being set correctly. Thanks, Chris Hostetter wrote: : Standard analyzer lower cases while indexing and searching. Correct, but since the toString() of your query still has capital words in it (like "contentNew:Wireless")

Re: Strange Problem ... Luke returns results Lucene api does not.

2006-02-16 Thread Chris Hostetter
: Standard analyzer lower cases while indexing and searching. Correct, but since the toString() of your query still has capital words in it (like "contentNew:Wireless") you obviously didn't build this query using the StandardAnalyzer -- IndexSearcher doesn't apply any Analyzers for you when you s

Re: Strange Problem ... Luke returns results Lucene api does not.

2006-02-16 Thread Mufaddal Khumri
I am using the standard analyzer with luke. Standard analyzer lower cases while indexing and searching. The BooleanQuery, finalQuery.toString() in my case below is: +(+contentNew:wireless +contentNew:fm +contentNew:car +contentNew:transmitter) +entity:product +(name:wireless fm car transmitte

Re: Strange Problem ... Luke returns results Lucene api does not.

2006-02-16 Thread Erik Hatcher
How are you constructing your BooleanQuery and what Analyzer are you using with Luke? You have some capitalized words in your query, and most analyzers would lowercase those, which may be the issue (perhaps you indexed the capitalized words?). Erik On Feb 16, 2006, at 2:41 PM, Mu

Strange Problem ... Luke returns results Lucene api does not.

2006-02-16 Thread Mufaddal Khumri
Hi, I have a query that gets hits via luke. I can see the documents it finds. But when I run the same query via my java code it returns 0 hits. Note: 1. I am using standard analyzer while indexing and searching. 2. I have made sure that I am querying the same index via luke or through my java

Re: using Expression language for lucene api

2005-03-21 Thread Otis Gospodnetic
I think there are some taglibs that let you call functions on objects, but you could also considering wrapping Hits in something that is JSTL friendly, perhaps a List that JSTL knows how to handle. Otis --- Omar Didi <[EMAIL PROTECTED]> wrote: > I have the following expression : > > > > resu

using Expression language for lucene api

2005-03-21 Thread Omar Didi
I have the following expression : results is of type Hits, i want to know if there is a way using Expression language or jstl to access for example: result.doc(i).