swissbib / vufind

A library resource discovery portal designed and developed for libraries by libraries
GNU General Public License v2.0
12 stars 7 forks source link

Simple searches with / or ; or , or . or & or other special characters give no results #677

Closed liowalter closed 5 years ago

liowalter commented 5 years ago

Simple searches with special characters don't work.

Examples (always 0 result) :

The advanced search in author field works fine:

The simple search also include a search in the id field and in the call number field.

When I remove these two fields from the searched fields (in searchspecs), then it works.

For these two fields, the word delimiter filter is not applied in the SOLR schema. There should be a way to configure solr or vufind so that it works.

liowalter commented 5 years ago

There might be something special with the / due to vufind-org#1182

liowalter commented 5 years ago

[searchconf] slash character prevents correct result

liowalter commented 5 years ago

VuFind core has the same behaviour. If I include callnumber search in searchspecs, then a search with a special character doesn't yield any results.

By default, VuFind doesn't include callnumber search in the simple search.

liowalter commented 5 years ago

If I take the search between ", it works https://test.swissbib.ch/Search/Results?lookfor=%22albert+%3B+einstein%22&type=AllFields&limit=20

liowalter commented 5 years ago

searching :

numerical ; quarteroni

description sow with callnumber and id solr query number of results
current status true yes link 0
true no link 148 (correct)
false no link 53 (missing a lot of documents)
false yes link 53 (missing a lot of documents)
liowalter commented 5 years ago

Effects of sow (with only three fields in qf) :

with sow=true

+(
    +(
        (callnumber:numerical)^50.0 | 
        (title:numerical)^200.0 | 
        (author:numerical)^750.0
    ) 
    +(
        (callnumber:;)^50.0
    ) 
    +(
        (callnumber:quarteroni)^50.0 | 
        (title:quarteroni)^200.0 | 
        (author:quarteroni)^750.0)
)

with sow=false

+(
    +(
        (callnumber:numerical;quarteroni)^50.0 | 
        (+title:numerical +title:quarteroni)^200.0 | 
        (+author:numerical +author:quarteroni)^750.0
    )
)
liowalter commented 5 years ago

Described very precisely here : https://opensourceconnections.com/blog/2018/02/20/edismax-and-multiterm-synonyms-oddities/

But you must be certain that all the fields being searched are consistently analyzed, with the same stopwords, synonyms, and query settings to avoid sudden field-centric surprises.

Which is not the case for us with the call-number field which is not splitted at spaces.

My suggestion :

For the simple search :