Questions tagged [lucene-highlighter]

36 questions
1
vote
0 answers

Lucene 5.3 Highlighter getBestFragments() not working

I am using the following code to take out the snippet of the retrieved results. The error shown below is coming at the line where the getBestFragment() function is used. I am using Apache Tomcat 7.0. Please help. public JSONArray search(String…
abs060
  • 33
  • 7
1
vote
1 answer

Lucene MultiFieldQueryParser and Highlighter

I am indexing articles in lucene index through different fields i.e. title, description, link, publishDate I query the index using MultiFieldQueryParser like +(title:[text]^5.0 description:[text]^4.0 link:[text]^3.0) +publishDate:[20150101 TO…
1
vote
1 answer

Problems using Lucene Highlighter

I am using Lucene Highlighter 2.4.1 for my application. I use the highlighter to get the best matching fragments, and display them. I make a call to a function String[] getFragmentsWithHighlightedTerms(Analyzer analyzer, Query query, String…
mksh15
  • 97
  • 8
1
vote
0 answers

Highlighting issue with quoted queries in Solr - fragment not returned

This is very curious. Highlighting works fine in every other case, but there's this one case it doesn't return any fragments. My document is as follows (fieldType text_en): Abu Yahya Suhaib bin Sinan (May Allah be pleased with him) reported that:…
Ansari
  • 8,168
  • 2
  • 23
  • 34
0
votes
1 answer

Lucene and Highlighted text font issues

Im using Lucene HighLighter, with success. Here is my code: StringBuffer sb = new StringBuffer(); for (int t = 0; t < fields.length; t++) { SimpleHTMLFormatter formatter = new SimpleHTMLFormatter( …
user1098063
0
votes
1 answer

Lucene Highlighter Isn't Match Prefixes

I'm using Lucene's Highlighter to highlight parts of a string. The code below seems to work fine for finding the stemmed words but not for prefix matching. EnglishAnalyzer analyzer = new EnglishAnalyzer(Version.LUCENE_34); QueryParser parser = new…
Zip184
  • 1,792
  • 2
  • 21
  • 34
0
votes
1 answer

Lucene searches on 2 field values as single

Lucene document has field a with content hello and a with content world. If i'll search "hello world"~2 it will be founded =(. How can I fix it? FastVectorHighlighter will highlight it like helloworld (without any space) (anyway it shouldn't…
fedor.belov
  • 22,343
  • 26
  • 89
  • 134
0
votes
1 answer

Hibernate Search 6 with Lucene Highlighter and Synonym List

we have a large synonym list. I use a manual analyzer to index the search field. The synonym list is annotated with the "SynonymGraphFilterFactory" filter. So far everything is good. When I do a search on the field, I get the matching…
0
votes
1 answer

Plain Highlighter "order":"none" is not working in Elasticsearch

I have created below test_plain_highlighter index. I want highlighted fragments should appear in order as they appear in the field using Plain Highlighter. I have tried below option, Set "order":"none" in highlight query (as shown in below…
MayankNC
  • 371
  • 3
  • 5
0
votes
1 answer

Position offset for Phrase queries in Lucene

I am working on customizing the Highlighter plugin(using FVH) to output the position offset of query terms for a given search. So far I have been able to extract the offset information for normal queries using the code below. However, for Phrase…
Jahangir
  • 685
  • 6
  • 13
0
votes
2 answers

I am getting NoClassDefFoundError even when CommonTermsQuery is included in the jar and i can see it in the build path. What could be the issue?

I am migrating Lucene from version 2 to 7.7.1 and facing below issue while upgrading lucene search. Getting NoClassDefFoundError for CommonTermsQuery even though the jar which it is part of is included(lucene-queries-7.7.1.jar). Can you please…
0
votes
1 answer

Lucene Highlighter TokenStream exception

I have a problem with Lucene Highlighter. I found some code on Stackoverflow and on other, but this code does not work in my program. This is a method where I try search and higlight words, but when I search something, program gives me…
Dominik Adamski
  • 164
  • 2
  • 14
0
votes
1 answer

solr pdf search highlighting issue

solr v6.5:- I have 2 pdf files indexed in a solr core. When I search for a keyword it is getting found in the document, however, the highlighting works for one document and not the other. For ex: when I search for "panic" which is there in one of…
0
votes
1 answer

How can I improve performance of Lucene Highlighter operations?

I have prototyped a search/browse application in C# using Lucene.Net. The source data is a single modest 5MB XML file (containing about 900 "documents") that I index using Lucene. My searches are working fine and are plenty fast. For this…
e-holder
  • 1,504
  • 4
  • 20
  • 33
0
votes
1 answer

ElasticSearch highlighting the matched part in query

I'm sending a match query to ElasticSearch and I'm getting back documents whose matching fields have been highlighted. What I'm trying to do is to map a set of documents to the matching substring in query. For example, assuming I query with "quick…