Intervals and Highlighter

2021-04-27 Thread Jean Morissette
Hi all, I'm using highlighter with TermQuery and RegexQuery and everything works well. As soon as I try to use IntervalQuery, the highlighter returns no fragment. Does someone know if IntervalQuery is supported with Highlighter / QueryScorer? Thanks, Jean

Unified Highlighter Error

2020-12-08 Thread Isaac Doub
I am having a problem with ElasticSearch 7.9.1 which seems to be caused by Lucene 8.6.2. If I perform a search with >288 filter terms using the unified highlighter I get a too_complex_to_determinize_exception error but if I switch to the plain highlighter it works fine. Is this a bug or am I do

Highlighter issue for Exact Phrase search

2019-05-31 Thread Naaser
Hello, I am searching exact phrase say "Jane Doe", there are two instances of this in the text. My highlighter is only outputting the first instance and not the second one. Can someone please help me understand the issue and how to fix it, any help would be highly appreciated. Part of

Re: Highlighter error with Lucene 6

2016-06-30 Thread Anna Berruezo
o wrote: > Hi, > > I have the following code: > > *QueryScorer scorer = new QueryScorer(query, "context");* > *Highlighter highlighter = new Highlighter(scorer);* > *String fragment = highlighter.getBestFragment(new StandardAnalyzer(), > "content", hDoc.g

Highlighter error with Lucene 6

2016-06-29 Thread Anna Berruezo
Hi, I have the following code: *QueryScorer scorer = new QueryScorer(query, "context");* *Highlighter highlighter = new Highlighter(scorer);* *String fragment = highlighter.getBestFragment(new StandardAnalyzer(), "content", hDoc.getContent());* but I get the following error

Re: highlighter with query over more than one word

2016-06-03 Thread David Smiley
It would help tremendously if you can give a specific code example showing the problem. On Thu, Jun 2, 2016 at 6:41 AM Sascha Janz wrote: > > we use highlighter to get textfragments for our hit list. > > the code is straight forward like this > >Analyzer analyzer = ne

highlighter with query over more than one word

2016-06-02 Thread Sascha Janz
we use highlighter to get textfragments for our hit list.   the code is straight forward like this    Analyzer analyzer = new StandardAnalyzer(;    QueryParser parser = new QueryParser( "content", analyzer);    Highlighter highlighter = new Highlighter(new QueryScorer(parser.pa

Re: Problem with NGramAnalyzer, PhraseQuery and Highlighter

2016-04-19 Thread Eva Popenda
you open a JIRA ticket? > > Alan Woodward > www.flax.co.uk > > >> On 18 Apr 2016, at 16:27, Eva Popenda wrote: >> >> Hi, >> >> I have a problem when using the Highlighter with N-GramAnalyzer and >> PhraseQuery: >> Searching for a sub

Re: Problem with NGramAnalyzer, PhraseQuery and Highlighter

2016-04-18 Thread Alan Woodward
> I have a problem when using the Highlighter with N-GramAnalyzer and > PhraseQuery: > Searching for a substring with length = N (4 in my case) yields the following > exception: > > java.lang.IllegalArgumentException: Less than 2 subSpans.size():1 > at > org.apache.

Problem with NGramAnalyzer, PhraseQuery and Highlighter

2016-04-18 Thread Eva Popenda
Hi, I have a problem when using the Highlighter with N-GramAnalyzer and PhraseQuery: Searching for a substring with length = N (4 in my case) yields the following exception: java.lang.IllegalArgumentException: Less than 2 subSpans.size():1 at org.apache.lucene.search.spans.ConjunctionSpans

Re: bug of highlighter/SimpleSpanFragmenter, returned longer fragment than expected?

2015-08-12 Thread Robert Alexander
ttached that attempts to solve the issue. For now I have given up. I'm assuming that most of the Lucene community just doesn't use that highlighter anymore. It is also difficult to reproduce the issue, so it probably doesn't cause a problem all that often. It isn't worth my

Re: Standard highlighter returns whole document as a fragment

2015-08-11 Thread Duke DAI
Seems we are encountering same problem. (thread: bug of highlighter/SimpleSpanFragmenter, returned longer fragment than expected?) When debugging, your fragmenter is SimpleSpanFragmenter? isNewFragment() returns true due to below logic? boolean isNewFrag = offsetAtt.endOffset() >= (fragmentS

Re: bug of highlighter/SimpleSpanFragmenter, returned longer fragment than expected?

2015-08-11 Thread Duke DAI
anTermQuery(new Term(FIELD_NAME, "cats"))); > QueryScorer queryScorer = new QueryScorer(query, FIELD_NAME); > Highlighter highlighter = new Highlighter(queryScorer); > // Highlighter highlighter = new Highlighter(new > QueryTermScorer(query)); > highlighter.setTextFra

bug of highlighter/SimpleSpanFragmenter, returned longer fragment than expected?

2015-08-06 Thread Duke DAI
void testSimpleQueryTermScorerHighlighter() throws Exception { doSearching(new SpanTermQuery(new Term(FIELD_NAME, "cats"))); QueryScorer queryScorer = new QueryScorer(query, FIELD_NAME); Highlighter highlighter = new Highlighter(queryScorer); // Highlighter highlighter = new

Standard highlighter returns whole document as a fragment

2015-08-06 Thread Robert Alexander
Hey everyone, I ran into an issue with the standard highlighter in 4.10.4 and was hoping that someone could help. I'm attempting to fragment a result based on a SpanNearQuery. If the words in the query are next to each other, the fragmenter will often return one large result containing the e

highlighter/fragmenter question

2015-04-30 Thread Fielder, Todd Patrick
Hello, I'm not sure if this is the correct approach, so please let me know if there is a better way to accomplish the following task I am attempting to search an entire database for a keyword. To do this, I indexed all the data fields into a single "content" field with a delimiter between each

Highlighter with conditions

2015-03-13 Thread Matthias Geiger
Hey All, i have a use case where users search my index for single chars like"A". Those Identifiers are contained in a special span in my html doc so indexing is working fine and i only get the hits i am looking for. But for the highlighting i am stuck... The highlighter will highligh

Highlighter - SimpleSpanFragmenter bug

2015-01-11 Thread zsolt.szloboda
on is: - is this really a bug? or am I overlooking something? - if this is a bug, why was it closed with "wont't fix"? why wasn't the patch applied? -- View this message in context: http://lucene.472066.n3.nabble.com/Highlighter-SimpleSpanFragmenter-bug-tp4178725.html Sent fro

Consistent colors from highlighter, multiple fields?

2014-08-25 Thread Rob Nikander
Hi, I'm using FastVectorHighlighter, and I wanted to get highlights from multiple fields that matched, so I called `highlighter.getBestFragment` for each field. It returns null if it had nothing for that field. The problem is the colors don't match, so it looks confusing. For example, I search f

Re: Help in Lucene Postings Highlighter..

2013-11-25 Thread VIGNESH S
Hi Mike, I indexed 1 GB document with postingshighlighter and Fast Vector Highlighter. To my Surprise PostingsHighlighter took almost 1.6 times FastVectorHighlighter.. I thought storing document offset will take less space compared to Storing Term Vector. On Mon, Nov 25, 2013 at 7:04 PM

Re: Help in Lucene Postings Highlighter..

2013-11-25 Thread Michael McCandless
m On Mon, Nov 25, 2013 at 6:43 AM, VIGNESH S wrote: > Hi, > > I tried indexing for PostingsHighligher with > TextField."TYPE_NOT_STOREDTYPE_STORED" and used postings highlighter..iam > getting null pointer Exception. > > But if i use TextField.TYPE_STORED

Help in Lucene Postings Highlighter..

2013-11-25 Thread VIGNESH S
Hi, I tried indexing for PostingsHighligher with TextField."TYPE_NOT_STOREDTYPE_STORED" and used postings highlighter..iam getting null pointer Exception. But if i use TextField.TYPE_STORED it is working properly.. can,t i use postingshighlighter without storing ?.Please kindly Help.

Postings highlighter with multiple values

2013-09-03 Thread Luca Cavanna
Hi, I would like to use the postings highlighter to highlight a whole field, therefore I'm using the WholeBreakIterator. But if the field has multiple values, I get a single snippet (with the chosen multiValuedSeparator between the different values), while I would like to get a highlighted sn

Re: Compression and Highlighter

2013-03-26 Thread Simon Willnauer
^5 ;) On Mon, Mar 25, 2013 at 11:02 PM, Bushman, Lamont wrote: > Thank you very much for the help Simon. I am amazed I was able to accomplish > what I wanted. I didn't store the body in the Index. And I used Highlighter > to return the best fragments by parsing my ori

RE: Compression and Highlighter

2013-03-25 Thread Bushman, Lamont
Thank you very much for the help Simon. I am amazed I was able to accomplish what I wanted. I didn't store the body in the Index. And I used Highlighter to return the best fragments by parsing my original document. From: Simon Willnauer [simon.w

Re: Compression and Highlighter

2013-03-25 Thread Simon Willnauer
ld it be feasible (time) to not store TermVectors or Store the > field at all until the user searches for a document. Then at runtime I can > re-index the top docs from the original documents in RAM and use Highlighter > to return fragments? this is what the highlighter does if you are

Compression and Highlighter

2013-03-25 Thread Bushman, Lamont
l the user searches for a document. Then at runtime I can re-index the top docs from the original documents in RAM and use Highlighter to return fragments? Thanks

Re: Highlighter throws ClassCastException TextFragment cannot be cast to DocumentFragment

2012-12-27 Thread Bin Lan
Woops, please ignore this. There is a mixed version of jar file... Sorry about this. Regards -- Bin Lan Software Developer Perimeter E-Security O - (203)541-3412 Follow Us on Twitter: www.twitter.com/PerimeterNews Read Our Blog: security.perimeterusa.com/blog On Thu, Dec 27, 2012 at 3:39 PM

Highlighter throws ClassCastException TextFragment cannot be cast to DocumentFragment

2012-12-27 Thread Bin Lan
We have a section of code that does the text highlight, it was running fine under lucene 1.9.1, but we are getting the following error after upgrade to 3.6.1. It does not seem to be anything that we have control of. any body have any suggestion on how to fix this? Exception while trying to select

Re: lucene highlighter

2012-12-04 Thread Nicola Buso
On Tue, 2012-12-04 at 17:30 +0530, madan mp wrote: > I am working with lucene 3.6 ,I am trying to use the highlighter 3.6 in my > search engine code, can you pls provide me full code for highlighting the > termspls..pls > > > regards > madan Hi, not a complete

Question on method visibility in Highlighter - WeightedSpanTermExtractor class

2012-10-17 Thread Dawn Zoë Raison
Hi folks, Is there a reason why the setMaxDocCharsToAnalyze() method of WeightedSpanTermExtractor() is protected? The class is a perfect fit for my requirement (enumerating the list of terms present in a document that match the current query for subsequent highlighting in a PDF file) with th

RE: Highlighter IOOBE with modified HyphenationCompoundWordTokenFilter

2012-10-05 Thread Markus Jelsma
- > From:Thomas Matthijs > Sent: Thu 04-Oct-2012 15:55 > To: java-user@lucene.apache.org > Subject: Re: Highlighter IOOBE with modified > HyphenationCompoundWordTokenFilter > > And to include the code > > On Thu, Oct 4, 2012 at 3:52 PM, Markus Jelsma > wrote: > &

Re: Highlighter IOOBE with modified HyphenationCompoundWordTokenFilter

2012-10-04 Thread Thomas Matthijs
And to include the code On Thu, Oct 4, 2012 at 3:52 PM, Markus Jelsma wrote: > I forgot to add that this is with today's build of trunk. > > -Original message- >> From:Markus Jelsma >> Sent: Thu 04-Oct-2012 15:42 >> To: java-user@lucene.apache.org &g

RE: Highlighter IOOBE with modified HyphenationCompoundWordTokenFilter

2012-10-04 Thread Markus Jelsma
I forgot to add that this is with today's build of trunk. -Original message- > From:Markus Jelsma > Sent: Thu 04-Oct-2012 15:42 > To: java-user@lucene.apache.org > Subject: Highlighter IOOBE with modified HyphenationCompoundWordTokenFilter > > Hi,

Highlighter IOOBE with modified HyphenationCompoundWordTokenFilter

2012-10-04 Thread Markus Jelsma
input token. For example: verzekeringmaatschappij now becomes verzekering and maatschappij and not verzekeringmaatschappij, ver, zeker, verzeker, zekering, ringmaat, maat and more. But it seem that i have done something wrong because my modified version sometimes causes the Highlighter to

Re: Highlighter and Shingles...

2012-04-21 Thread Dawn Zoë Raison
Steve, Exactly the right question... Prompted by your question, further investigation reveals that I need to move the "access" part of my lucene query into a filter to prevent non-matching documents getting scored. In that situation of course the highlighter finds nothing to

RE: Highlighter and Shingles...

2012-04-20 Thread Steven A Rowe
Hi Dawn, Can you give an example of a "partial match"? Steve -Original Message- From: Dawn Zoë Raison [mailto:d...@digitorial.co.uk] Sent: Friday, April 20, 2012 7:59 AM To: java-user@lucene.apache.org Subject: Highlighter and Shingles... Hi, Are there any notes on

Highlighter and Shingles...

2012-04-20 Thread Dawn Zoë Raison
Hi, Are there any notes on making the highlighter work consistently with a shingle generated index? I have a situation where complete matches highlight OK, but partial matches do not - leading to a number of blank previews... Our analyser look like: TokenStream result

Hit Highlighting which highlighter to use?

2012-04-04 Thread Paul Hill
Using the original org.apache.lucene.search.highlight.Highlighter should I be able to give it a query like [ My AND Words AND "My Words"^100 ] (the actually phrase in this query is converted to a span query with a slop 1), and expect it find the fragment many pages into the file that has span "My

Re: highlighter: how can I get locations of fragments?

2011-12-14 Thread Chris Hostetter
: Subject: highlighter: how can I get locations of fragments? : References: <4ee79b27.1010...@wyona.com> : In-Reply-To: <4ee79b27.1010...@wyona.com> https://people.apache.org/~hossman/#threadhijack Thread Hijacking on Mailing Lists When starting a new discussion on a mailing list, p

highlighter: how can I get locations of fragments?

2011-12-13 Thread Ilya Zavorin
I know how to get relevant highlighted fragments together with some surrounding text using Lucene highlighter, namely, using Highlighter highlighter = new Highlighter(scorer); String[] fragments = highlighter.getBestFragments(stream, fieldContents, fragmentNumber); But

Re: highlighter by using term offsets

2011-11-24 Thread Ian Lea
am=TokenSources.getTokenStream(tpv); > >            String result = >                highlighter.getBestFragments( >                    tokenStream, contents, 1, "..."); >            System.out.println("\n" + result); > > >  } > > When I proint &qu

Re: highlighter by using term offsets

2011-11-24 Thread starz10de
its[i].doc" I see that are not null. The problem is in this line "TermPositionVector tpv = (TermPositionVector)reader.getTermFreqVecto (hits[i].doc,"contents"); " hits[i].doc represent the Doc id or ? Thanks -- View this message in c

Re: highlighter by using term offsets

2011-11-24 Thread Ian Lea
On Thu, Nov 24, 2011 at 11:21 AM, starz10de wrote: > Hi, > > no hits are not null, I can print all retrieved docuemtns without problem. > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/highlighter-by-using-term-offsets-tp3527712p3533380.html > Sen

Re: highlighter by using term offsets

2011-11-24 Thread starz10de
Hi, no hits are not null, I can print all retrieved docuemtns without problem. -- View this message in context: http://lucene.472066.n3.nabble.com/highlighter-by-using-term-offsets-tp3527712p3533380.html Sent from the Lucene - Java Users mailing list archive at Nabble.com

Re: highlighter by using term offsets

2011-11-23 Thread Ian Lea
: > >  I'm writing a highlighter by using term offsets as follows: > > > IndexReader reader = IndexReader.open( indexPath ); > TermPositionVector tpv = (TermPositionVector)reader.getTermFreqVector( > hits[i].doc,"contents"); > > Whe

highlighter by using term offsets

2011-11-22 Thread starz10de
I'm writing a highlighter by using term offsets as follows: IndexReader reader = IndexReader.open( indexPath ); TermPositionVector tpv = (TermPositionVector)reader.getTermFreqVector( hits[i].doc,"contents"); When I run the searcher, I face this error in Ter

RE: lucene highlighter

2011-11-20 Thread Uwe Schindler
Hi > Thanks for your useful comments: > > here I could do what I want with the highlighter which work with lucene 3: > > QueryScorer scorer = new QueryScorer(query, reader, "contents"); > Highlighter highlighter = new Highlighter(scorer); &g

RE: lucene highlighter

2011-11-20 Thread starz10de
Hi, Thanks for your useful comments: here I could do what I want with the highlighter which work with lucene 3: QueryScorer scorer = new QueryScorer(query, reader, "contents"); Highlighter highlighter = new Highlighter(scorer); Strin

RE: lucene highlighter

2011-11-20 Thread Uwe Schindler
Hi, You should review the new API of Lucene 3.0, SpanScorer was replaced by something else. The CHANGES.txt of the contrib package may give you some hints. Its long time ago that we changed this api (Lucene 3.0 is also "ancient"). Contrib-Highlighter may break backwards compatibility

RE: lucene highlighter

2011-11-20 Thread starz10de
Hi Uwe, Thanks for your answer. I am using now lucene-highlighter-3.0.3 but the problem I have this error: “SpanScorer can’t be resolved as a type” > SpanScorer scorer = new SpanScorer(query, fieldName, new > CachingTokenFilter(stream)); I checked the class path and there were

RE: lucene highlighter

2011-11-20 Thread Uwe Schindler
...@thetaphi.de > -Original Message- > From: starz10de [mailto:farag_ah...@yahoo.com] > Sent: Sunday, November 20, 2011 10:53 AM > To: java-user@lucene.apache.org > Subject: lucene highlighter > > Hi, > > I have a problem with lucene highlighter. I couldn’t mak

lucene highlighter

2011-11-20 Thread starz10de
Hi, I have a problem with lucene highlighter. I couldn’t make it run. The compilation is without error but when I run it I got this error “Exception in thread "main" java.lang.NoSuchMethodError:org.apache.lucene.analysis.TokenStream.next(Lorg/apache/lucene/analysis/Token;)Lorg/apa

Re: Search highlighter for custom Query implementations - how to?

2011-09-12 Thread Lukáš Vlček
, 2011 at 12:08 AM, Michael Sokolov wrote: > Lukas there really isn't any support for custom Query types in Highlighter, > as you've found. If you inherit from one of the types it does support, or > rewrite your query to one of them, that should work, but the Query class > just

Re: Search highlighter for custom Query implementations - how to?

2011-09-09 Thread Michael Sokolov
Lukas there really isn't any support for custom Query types in Highlighter, as you've found. If you inherit from one of the types it does support, or rewrite your query to one of them, that should work, but the Query class just doesn't provide enough support for Highlighter

Search highlighter for custom Query implementations - how to?

2011-09-09 Thread Lukáš Vlček
Hi, What is the recommended way to use custom Query implementations with Lucene (3.3.0) Highlighter framework? In short, what worries me a bit is the fact that WeightedSpanTermExtractor#extract(Query, Map) accepts a general Query parameter but inside it does a lot of tests against particular

dynamic frag size - highlighter

2011-05-25 Thread dan sutton
Hi, I'd like to make highlighting work as follows: length(all snippits) approx. 200 chars hl.snippits = 2 (2 snippits) e.g. if there is only 1 snippet available, length <= 200chars e.g. if there is >1 snippet, length each snippet == 100chars, so I take the first 2 and get 200 chars Is this pos

dynamic frag size - highlighter

2011-05-25 Thread dan sutton
Hi, I'd like to make highlighting work as follows: length(all snippits) approx. 200 chars hl.snippits = 2 (2 snippits) e.g. if there is only 1 snippet available, length <= 200chars e.g. if there is >1 snippet, length each snippet == 100chars, so I take the first 2 and get 200 chars Is this pos

Re: Difference between regular Highlighter and Fast Vector Highlighter ?

2011-04-11 Thread Mark Miller
The general and short answer is: Highlighter: highlights more query types, has a fairly rich API, doesn't scale well to very large documents (though https://issues.apache.org/jira/browse/LUCENE-2939 is going to help a lot here) - does not require that you store term vectors, but is fast

Re: Difference between regular Highlighter and Fast Vector Highlighter ?

2011-04-01 Thread shrinath.m
> implementation of > > highlighters... > > I saw the javadoc of FVH, but it only says "another implementation of > Lucene > > Highlighter" ... > > Description section in the javadoc shows the features of FVH: > > > https://builds.apache.org/hudson/job/Luce

Re: Difference between regular Highlighter and Fast Vector Highlighter ?

2011-04-01 Thread Koji Sekiguchi
(11/04/01 21:32), shrinath.m wrote: I was wondering whats the difference between the Lucene's 2 implementation of highlighters... I saw the javadoc of FVH, but it only says "another implementation of Lucene Highlighter" ... Description section in the javadoc shows the features

Difference between regular Highlighter and Fast Vector Highlighter ?

2011-04-01 Thread shrinath.m
I was wondering whats the difference between the Lucene's 2 implementation of highlighters... I saw the javadoc of FVH, but it only says "another implementation of Lucene Highlighter" ... Can someone throw some more light on this ? -- View this message in context: http://l

RE: Re:RE: About highlighter

2011-03-18 Thread Pierre GOSSE
another issue (apparently unrelated, but who knows ?) See https://issues.apache.org/jira/browse/LUCENE-2874 Pierre De : Cescy [mailto:ee07b...@gmail.com] Envoyé : vendredi 18 mars 2011 07:32 À : java-user; Pierre GOSSE Objet : Re:RE: About highlighter Yes, I only search the "contents"

RE: About highlighter

2011-03-17 Thread Pierre GOSSE
Ian Lea [mailto:ian@gmail.com] Envoyé : mercredi 16 mars 2011 22:29 À : java-user@lucene.apache.org Objet : Re: About highlighter I know nothing about highlighting but that 500 looks like a good place to start investigating. -- Ian. On Tue, Mar 15, 2011 at 8:47 PM, Cescy wrote: > Hi,

Re: About highlighter

2011-03-16 Thread Ian Lea
I know nothing about highlighting but that 500 looks like a good place to start investigating. -- Ian. On Tue, Mar 15, 2011 at 8:47 PM, Cescy wrote: > Hi, > > > My highlight code is shown as following: > > >  QueryScorer scorer = new QueryScorer(query); >  Highl

About highlighter

2011-03-16 Thread Gong Li
Hi, My highlight code is shown as following: QueryScorer scorer = new QueryScorer(query); Highlighter highlighter = new Highlighter(simpleHTMLFormatter, scorer); highlighter.setTextFragmenter(new SimpleSpanFragmenter(scorer, 500)); String contents = doc.get("contents"); T

About highlighter

2011-03-15 Thread Cescy
Hi, My highlight code is shown as following: QueryScorer scorer = new QueryScorer(query); Highlighter highlighter = new Highlighter(simpleHTMLFormatter, scorer); highlighter.setTextFragmenter(new SimpleSpanFragmenter(scorer, 500)); String contents = doc.get("contents"); T

Re: phrase query highlighter spans matching

2011-03-08 Thread shrinath.m
How to use it ? Example please ? Regards - Shrinath. M -- View this message in context: http://lucene.472066.n3.nabble.com/phrase-query-highlighter-spans-matching-tp828257p2653941.html Sent from the Lucene - Java Users mailing list archive at Nabble.com.

Re: Lucene Questions about query and highlighter~^^

2011-02-09 Thread Ian Lea
t;  Correct? And what about the other 2? > > *Q2*. Then I use the following code to get context of the search result. > Note: the result must be ordered by relevance. > >  Query q = new QueryParser(Version.LUCENE_30,"field", > analyzer).parse(expression); >  QueryScor

Lucene Questions about query and highlighter~^^

2011-02-08 Thread Gong Li
ered by relevance. Query q = new QueryParser(Version.LUCENE_30,"field", analyzer).parse(expression); QueryScorer scorer = new QueryScorer(query); Highlighter highlighter = new Highlighter(scorer); highlighter.setTextFragmenter(new SimpleSpanFragmenter(scorer, 500)); And there are something wrong in line 2 for the 4 kinds of queries. How can I modify the code to get the snippet of the content? Thanks.

Lucene Questions about query and highlighter~^^

2011-02-08 Thread Gong Li
ered by relevance. Query q = new QueryParser(Version.LUCENE_30,"field", analyzer).parse(expression); QueryScorer scorer = new QueryScorer(query); Highlighter highlighter = new Highlighter(scorer); highlighter.setTextFragmenter(new SimpleSpanFragmenter(scorer, 500)); And there are something wrong in line 2 for the 4 kinds of queries. How can I modify the code to get the snippet of the content? Thanks.

Re: Retrieving payload attribute in highlighter

2010-12-01 Thread Fabiano Nunes
ple there. The gist > is that you create a MemoryIndex on the fly and index the doc in question > into it, then you can get the IndexReader from the IndexSearcher associated > with the MemoryIndex. All this is similar to how Highlighter works, and it > looks like you have access to the o

Re: Retrieving payload attribute in highlighter

2010-11-30 Thread Erick Erickson
d with the MemoryIndex. All this is similar to how Highlighter works, and it looks like you have access to the original input? Now, this is largely a guess, so don't waste time if I'm really off base with this. Best Erick On Tue, Nov 30, 2010 at 2:16 PM, Fabiano Nunes wrote: > Ok

Re: Retrieving payload attribute in highlighter

2010-11-30 Thread Fabiano Nunes
what I'm > > expecting. > > But, I'm concerned about the warning message in API docs (indeed, I think > I > > dont understand it). There is any other approach? Can I have the same > > results retrieving the termPositions without performance issues? > > >

Re: Retrieving payload attribute in highlighter

2010-11-30 Thread Erick Erickson
There is any other approach? Can I have the same > results retrieving the termPositions without performance issues? > > Thanks. > > On Tue, Nov 30, 2010 at 1:20 PM, Fabiano Nunes wrote: > > > Hello, > > I'm trying to retrieve payloads from the highligh

Re: Retrieving payload attribute in highlighter

2010-11-30 Thread Fabiano Nunes
ance issues? Thanks. On Tue, Nov 30, 2010 at 1:20 PM, Fabiano Nunes wrote: > Hello, > I'm trying to retrieve payloads from the highlighteds terms by Highlighter > class. In my tests, all terms returned from Highlighter has null as payload. > Example: > > Highlighter h =

Retrieving payload attribute in highlighter

2010-11-30 Thread Fabiano Nunes
Hello, I'm trying to retrieve payloads from the highlighteds terms by Highlighter class. In my tests, all terms returned from Highlighter has null as payload. Example: Highlighter h = new Highlighter(new Formatter() { public String highlightTerm(String originalText, TokenGroup tokenGroup) {

Re: trying to use the highlighter

2010-09-05 Thread Paul Libbrecht
ping! Any hope for help here? I'm a bit stuck before deploying a release. thanks in advance paul On 3 sept. 2010, at 14:05, Paul Libbrecht wrote: > > Hello list, > > I'm strugging again with the highlighter. I don't understand why I obtain > sporadicall

trying to use the highlighter

2010-09-03 Thread Paul Libbrecht
Hello list, I'm strugging again with the highlighter. I don't understand why I obtain sporadically InvalidTokenOffsetsException. The mission: given a query, detect which field was matched, among the names of the concepts: there can be several names for a given concept, also in one

Antwort: Re: Re: Highlighter wildcard problems: NoClassDefFoundError in Linux/CentOS 5.4, works in Windows XP

2010-07-30 Thread Markus Roth
@lucene.apache.org 30.07.2010 Kopie 15:51 Thema Re: Re: Highlighter wildcard

Re: Re: Highlighter wildcard problems: NoClassDefFoundError in Linux/CentOS 5.4, works in Windows XP

2010-07-30 Thread Ian Lea
Because the highlighter only uses MemoryIndex if wildcards are involved? I don't use the highlighter package so have no idea if that is correct or not, but the message java.lang.NoClassDefFoundError: org/apache/lucene/index/memory/MemoryIndex is clear. The jvm can't find that class

Antwort: Re: Highlighter wildcard problems: NoClassDefFoundError in Linux/CentOS 5.4, works in Windows XP

2010-07-30 Thread Markus Roth
Thema Re: Highlighter wildcard problems: Bitte NoClassDefFoundError in antworten an Linux/CentOS 5.4, works in

Re: Highlighter wildcard problems: NoClassDefFoundError in Linux/CentOS 5.4, works in Windows XP

2010-07-30 Thread Ian Lea
, > > I'm using lucene for obvious purposes and I'm trying to highlight > search-term results. > > libraries I use: > lucene-core version: 3.0.2 > lucene-highlighter version: 3.0.2 > > Dev-System: > WinXP Pro 32Bit, jdk1.6.0_20, > java version "1.6.0_

Highlighter wildcard problems: NoClassDefFoundError in Linux/CentOS 5.4, works in Windows XP

2010-07-30 Thread Markus Roth
Hello everyone, I'm using lucene for obvious purposes and I'm trying to highlight search-term results. libraries I use: lucene-core version: 3.0.2 lucene-highlighter version: 3.0.2 Dev-System: WinXP Pro 32Bit, jdk1.6.0_20, java version

about TokenSources.getTokenStream and highlighter

2010-06-12 Thread Li Li
hi all when use highlighter, We must provide a tokenStream and the original text. To get a tokenStream, we can either reanlyze the original text or use saved TermVector to reconstruct it. In my application, highlight will cost average 200ms-300ms, and I want to optimze it to lower than 100ms

synonym highlighter

2010-06-07 Thread Aad Nales
Hi All, We are mixing Lucene with a commercial service giving us all kinds of synonyms. We add these synonyms to the index and we can search with them. The problem we have is 'highlighting' the orginal word when a synonym is found. We were thinking along the following approach. 1. Get a term 2.

Re: phrase query highlighter spans matching

2010-05-31 Thread Koji Sekiguchi
(10/05/19 13:58), Li Li wrote: hi all, I read lucene in action 2nd Ed. It says SimpleSpanFragmenter will "make fragments that always include the spans matching each document". And also a SpanScorer existed for this use. But I can't find any class named SpanScorer in lucene 3.0.1. And the res

Highlighter in lucene doesn't return any fragment

2010-05-21 Thread Diego Campoy
I'm trying to implement highlighting in my lucene application and I can't get any fragment. getBestFragment always returns null. My code: QueryParser parser = new QueryParser(Version.LUCENE_30, "text", myAnalyzer); Query realQuery = parser.parse(query); Highlight

phrase query highlighter spans matching

2010-05-18 Thread Li Li
hi all, I read lucene in action 2nd Ed. It says SimpleSpanFragmenter will "make fragments that always include the spans matching each document". And also a SpanScorer existed for this use. But I can't find any class named SpanScorer in lucene 3.0.1. And the result of HighlighterTest class in c

Re: Highlighter usage

2010-04-29 Thread Justin
10 4:21:35 PM Subject: Re: Highlighter usage That's the *StandartTokenizer*, which is not at all identical to StandardAnalyzer. From the Javadoc for StandardAnalyzer: Filters StandardTokenizer<http://lucene.apache.org/java/2_4_0/api/org/apache/lucene/analysis/standard/StandardTokenize

Re: Highlighter usage

2010-04-29 Thread Erick Erickson
oken() and stem or is there a better way to use > something like SnowballFilter? > > > > > - Original Message > From: Erick Erickson > To: java-user@lucene.apache.org > Sent: Thu, April 29, 2010 3:30:09 PM > Subject: Re: Highlighter usage > > What analyzer are

Re: Highlighter usage

2010-04-29 Thread Justin
em or is there a better way to use something like SnowballFilter? - Original Message From: Erick Erickson To: java-user@lucene.apache.org Sent: Thu, April 29, 2010 3:30:09 PM Subject: Re: Highlighter usage What analyzer are you using at index time? My guess is something

Re: Highlighter usage

2010-04-29 Thread Erick Erickson
What analyzer are you using at index time? My guess is something like WhitespaceAnalyzer that doesn't stem or change case. Try a different analyzer, SimpleAnalyzer comes to mind HTH Erick On Thu, Apr 29, 2010 at 4:21 PM, Justin wrote: > I'm trying to use Highlighter wit

Highlighter usage

2010-04-29 Thread Justin
I'm trying to use Highlighter with QueryScorer after reading: https://issues.apache.org/jira/browse/LUCENE-1685 The problem is: I'm not getting a result unless my the query term is an exact match. Am I missing filters? Is there a more complete example of how this should work?

Not getting any highlighter results when using wildcards

2010-02-24 Thread Woolf, Ross
When I use a WildcardQuery with the highlighter, I don't get any fragments back, I get null returned to strBetText. If I just use a term query then it works. TokenStream tokenStream = TokenSources.getTokenStream(indexReader, docId, strFieldName); QueryScorer scorer = new QueryScorer(

AW: Highlighter / cannot be instantiated

2010-01-29 Thread Marc Schwarz
Yep that was it :-) Thanks ! -Ursprüngliche Nachricht- Von: Illés Solt [mailto:illes.s...@gmail.com] Gesendet: Freitag, 29. Januar 2010 15:42 An: java-user@lucene.apache.org Betreff: Re: Highlighter / cannot be instantiated Are you sure you imported Highlighter from the correct lucene

Re: Highlighter / cannot be instantiated

2010-01-29 Thread Illés Solt
Are you sure you imported Highlighter from the correct lucene namespace org.apache.lucene.search.highlight.Highlighter and not something else like javax.swing.text.Highlighter? Illes 2010/1/28 Marc Schwarz : > I'm trying to get the highlighter running, but didn't get it work. &

Highlighter / cannot be instantiated

2010-01-28 Thread Marc Schwarz
I'm trying to get the highlighter running, but didn't get it work. Everywhere it's posted as following: Highlighter highlighter = new Highlighter(new SimpleHTMLFormatter(), new QueryScorer(query)); but that gives me a "Highlighter is abstract; cannot be instantiated".

Re: Highlighter doesn't highlight wildcard queries after updating to 2.9.1/3.0.0

2010-01-11 Thread Mohsen Saboorian
changing MultiTermRewriteMethod fixed all previous incompatibility issue. After setting this: myQueryParser.setMultiTermRewriteMethod(MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE); highlighter get compatible with rewrite, query.rewrite().toString() works as before and scoring works fine for

Re: Highlighter doesn't highlight wildcard queries after updating to 2.9.1/3.0.0

2010-01-10 Thread Mohsen Saboorian
OK, to answer my own question: I found from the following issue that if I do a query.rewrite(), highlighter doesn't work. https://issues.apache.org/jira/browse/LUCENE-1425 I did rewrite() in order to find all matched terms for example in a prefix query, but as this doesn't work an

  1   2   3   >