Search code examples
solr

SOLR wildcard search for prefix


I have some data in the following format:

2 QUEEN STREET
2 QUENTIN STREET
UNIT 1 2 QUEEN STREET

Currently, I can search using the following

street_name:/2[A-Z]* QUE[A-Z]*.*/) 

and it I get

2 QUEEN STREET
2 QUENTIN STREET

Is there a way to include the 3rd name in the results rather than doing a separate query

street_name:/[0-9A-Z] 2[A-Z]* QUE[A-Z]*.*/)

which returns

UNIT 1 2 QUEEN STREET

Basically, looking to get all three results in one go.

Thanks


Solution

  • Answering my own question here... figured out that I can use the OR operator to combine queries.