0
votes

I am using Solr 6.2. I want to get the matched words by using highlight option.

When I search with the word "miss" I can get the highlights. But I cant get results for the word "missing".

For Example: when I search with "miss" I can get the below results: http://localhost:8983/solr/logbook1/select?debugQuery=on&defType=dismax&defType=edismax&hl.fl=*&hl=on&indent=on&q=miss&rows=5&wt=json

highlighting":{

"3246a347-874a-44e2-bb3d-949a358f435d":{
  "String1":["IN REFERENCE CABIN LOG PAGE 22838. TWO EXTENSION SEAT BELT <em>MISS</em> ING"]},
"46a340f8-949f-41fe-b2ee-c1936bfc6b4f":{
  "String1":["IN REFERENCE CABIN LOG PAGE 22838. TWO EXTENSION SEAT BELT <em>MISS</em> ING"]},
"df6eef1c-971d-48f7-a93a-07874011ae5b":{
  "String1":["ACCESS PANEL 343EB ON R/H HORIZONTAL STAB FOUND WITH SCREW <em>MISS</em> ING AND LOOSE"]},
"9a124f6d-f32b-4e24-beb2-11f7aa22894d":{
  "String1":["AFT GALLEY # 4 COFFEE MAKER SHIELDS ON COMPT 419 - 420 ARE <em>MISS</em> ING."]}},

When I search with missing, I am getting no result as below: http://localhost:8983/solr/logbook1/select?debugQuery=on&defType=dismax&defType=edismax&hl.fl=*&hl=on&indent=on&q=missing&rows=5&wt=json

"highlighting":{

"0d2963a7-adea-40ab-af0a-bb8fe069c4d9":{},
"9f23f4c0-6989-471d-8c61-4016a8e38813":{},
"c77b6be1-547c-43fe-94f0-ae5c0849eab4":{},
"f5792594-7fd2-42b5-92c4-03257c05adba":{},
"68d9251a-74d9-409e-84ec-a67a0eb94866":{}},

I have checked the fragsize options. Please guide is there anything to configure.

2
Just do a simple search for data containing missing. Does it return any results? That is, is there any data that matches missing at all.Gautam
What is your highlighting configuration and definition of the field? This seems to be an issue with missing analysis/different analysis where the term has been stemmed when stored and not when being searched or something similar.MatsLindh
@Gautam, when searching with the word missing, I can get results.Vanaja Jayaraman
@MatsLindh where can I find the highlighting configuration and definition of the field?Vanaja Jayaraman
Upon looking at your query again, your q parameter has no field mentioned. Or are you trying to search for missing in all fields across your documents?So which field do you want to highlight, String1? Try adding &hl.q=String1:missing to your queryGautam

2 Answers

3
votes

1) So i assume you already of lowercase filter on your index field as it will fetch upper and lower case results.

2) And have you added extra space between miss + ing ? if yes you need to remove that and have a try.

3) Please check stop word dictionary if you haven't accidentally added missing there as they get ignored in searching.

4)Try Analyzer from solr to see how to transforms your search term, analyzer is available in solrconsole.

0
votes

Have you set indexed and stored to true? For me it looks like, that there are probably different setting for token-handling on indexing and search time. Take a look at your schema.xml an try to work with same settings for indexing and searching.