I've come across and interesting quirk in the SOLR backend that affects fulltext searches for works with less than 4 characters.

In my set-up queries with 4 characters and more return correct excerpts (highlighting in SOLR speak). Searching for anything with less than 4 characters, such as many abbreviations, returns a highlight tree with node ids but no excerpts, e.g.:

select?sort=score+desc,+ds_field_date_dd+desc,+bs_promote+asc,+ds_created+desc&f.spell.hl.fragsize=700&hl=true&fl=*,score&fq=index_id:case_law&hl.fragsize=0&f.spell.hl.snippets=2&qf=t_title&qf=t_field_court_name&qf=t_field_ncn&qf=t_field_ocn&qf=t_search_api_aggregation_1&qf=t_field_headnote:value&qf=t_field_summary:value&qf=t_field_facts:value&hl.fl=*&hl.snippets=1&start=0&q="fgm"

Returns:

<response><lst name="responseHeader"><int name="status">0</int><int name="QTime">45</int></lst><result name="response" numFound="17" start="0" maxScore="0.4190474">
[..]
<lst name="highlighting"><lst name="case_law-190"/><lst name="case_law-829"/><lst name="case_law-455"/><lst name="case_law-669"/><lst name="case_law-496"/><lst name="case_law-339"/><lst name="case_law-343"/><lst name="case_law-667"/><lst name="case_law-341"/><lst name="case_law-327"/></lst></response>

Can anyone confirm this? Any ideas how to fix it?

Comments

miiimooo’s picture

Status: Active » Fixed

This is caused by a setting schema.xml

239c239
<        <filter class="solr.LengthFilterFactory" min="4" max="20" />
---
>        <filter class="solr.LengthFilterFactory" min="3" max="20" />

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jtbayly’s picture

I'm adding the word "length" to this issue. I would have found the solution sooner with that word. :)

length