Developer forum

Forum » Feature requests » search input in quotes

search input in quotes

Rune Skovbo
Reply

Hello good people,

Not sure if this can be considered a feature request, but can it be made possible to do a strict search by using quotes in the search input, with an index based search?

Apparently a specific search like "search this" worked using the old search:
https://www.eiva.com/hidden-pages/search?q=%22eiva+named%22 vs https://www.eiva.com/hidden-pages/search?q=eiva+named 

I don't see it working on other newer sites, though - regardsless of platform.

Regards,
Rune


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Rune

Well, yes, there is a big difference on how database and index based searches they work. But I believe it is achievable my configuring the index correctly and do some stuff on the query.

The problem is that Lucene will "Analyze" all fields by default - meaning splitting up all words and remove weird characters. Each word is a term. This can be handled by having fields in the index that is NOT analyzed. And them search them using the right term condition.

Attached an example - added a summary field that is not analyzed, and search that using a "ContainsExtended" operator.

As you can see, I have created an other parameter for this - if I re-used the existing q-parameter that is also used for the analyzed field, it would not work.

Hope this clarifies.

Capture2.PNG
Votes for this answer: 1
 
Nicolai Pedersen
Reply
Capture.PNG
 
Rune Skovbo
Reply

Great Nicolai - thanks a lot :-)

/Rune