Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

solr : search query with spaces between words

Tags:

solr

I have have a latin plant name like Chamaecyparis obtusa So the result should be all plantnames that starts with Chamaecyparis obtusa

I want to get results like

Chamaecyparis obtusa 'Confucious'
Chamaecyparis obtusa 'Contorta'
Chamaecyparis obtusa 'Coralliformis'
Chamaecyparis obtusa 'Crippsii'

The problem is the space between the words Chamaecyparis and obtusa For that reson it will not work

I tried it with * and ? but there must be a simple way to do this

like image 886
Hessel Jespers Avatar asked Apr 12 '12 11:04

Hessel Jespers


1 Answers

Couple things worth trying from here: solr query with white space

  • remove all white space: Chamaecyparisobtusa
  • use quotes: "Chamaecyparis obtusa"
  • use parenthesis: (Chamaecyparis obtusa)

Additional tips may be found here (check the links also): Solr Query Syntax

like image 113
ZZ-bb Avatar answered Sep 27 '22 18:09

ZZ-bb