Solr does not accept requests with a dot

I am currently facing one question over and over again. I use the collective Solr 4.1.0 Search on our Plone 4.2.6 system. Currently, if there is no search, it works fine, as long as there is no wildcard in the search field. So, for example, it Prof Dr Mathew Rogers works great and returns good results, for example, "Professional Man" Dr. Matthew Rogers.

When I omit the search, Prof. Dr. Mathew Rogers Solr will not return any results.

I checked all the other questions on this platform regarding these or related problems, but no one answered correctly. Do any of you have an idea why the Solr request process breaks down when I search for something containing, for example, a dot? Help will be greatly appreciated!

+4
source share
1 answer

There is a great feature collective.solrthat you can query solr using the lucene query syntax from the plone search.

Query syntax: -> https://lucene.apache.org/core/2_9_4/queryparsersyntax.html

collective solr has a simple test if it should distort your search query using the settings in the collect.solr file, or if it passes it as a simple lucene request to solr.

The test is really simple, but the mangle code is to understand (at least for me):

simpleTerm = compile(r'^[\w\d]+$', UNICODE)

...

simpleCharacters = compile(r'^[\w\d\?\*\s]+$', UNICODE)

If you do not agree with the term, collect.solr assumes that you are trying to execute the request using the simple lucene syntax, and therefore it will not show the result in your case.

, :

  • - .solr lucene.
  • , .solr.

- , -, , , ..

, .

Afaik - solr -

SO ,

, . , , . , . . .

, , - : -)

, lucene, , .

+2

Source: https://habr.com/ru/post/1658344/


All Articles