Searching for special characters with RavenDB

35 views
Skip to first unread message

Jurca Denisa

unread,
Aug 14, 2017, 2:47:36 AM8/14/17
to RavenDB - 2nd generation document database
Hello,

I want to be able to search for string like "Test%$" or, "$%Test", or "Tes#$t". 

For the "$%Test", if I type "$%" it should work, and receive what I want,
For the "Tes#$t", if I type "Tes#" it should work, and receive what I want,
For the "Test%$", if I type "Test" it should work, and receive what I want

For this, now I`m using default analyzer for indexing, combined with wildcards (EscapeQueryOptionsAllowPostfixWildcard).
 
From what I have read is not ok to use the searching like this, for good reasons.(the performance will drop) https://groups.google.com/forum/#!topic/ravendb/knU5QQE8p1w.

Can you help me with an advice? How to do the search in order to be able to search for special characters too?

Thanks a lot!

Oren Eini (Ayende Rahien)

unread,
Aug 14, 2017, 2:54:01 AM8/14/17
to ravendb
This should all just work, are you running into specific issues?

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jurca Denisa

unread,
Aug 14, 2017, 5:20:05 AM8/14/17
to RavenDB - 2nd generation document database
Hello,

I didn`t run on any specific issue. I was just wondering if there is an another way to do this, without impacting the performance so much. From what I`ve understood the using of wildcards is impacting the performance.

The default indexing + wildcards is the best option in order to be able to search with special characters too?
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.

Oren Eini (Ayende Rahien)

unread,
Aug 14, 2017, 5:24:09 AM8/14/17
to ravendb
Non of them are wildcards, so there shouldn't be any problems
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Jurca Denisa

unread,
Aug 14, 2017, 7:10:12 AM8/14/17
to RavenDB - 2nd generation document database
Ok, thanks a lot for your answer
Message has been deleted

Oren Eini (Ayende Rahien)

unread,
Aug 16, 2017, 4:52:08 AM8/16/17
to ravendb
Please create a test case for that, or use live-test.ravendb.net for a demo we can look at

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


On Wed, Aug 16, 2017 at 11:19 AM, Jurca Denisa <jurca.deni...@gmail.com> wrote:
Hello Oren,

Sorry for bother you again. Using the Default analyzer for indexing, I`m not able to perform searches like:
 
If I type "mmmmH", and in memory I have "mmmmHrantigoth", it does not return me anything
If I type "mmmmHrantigoth"  and in memory I have "mmmmHrantigoth", it does not return me anything.

I think is about how the analyzer tokenize the fields. 
Do you have any suggestion for this?

On Monday, August 14, 2017 at 12:24:09 PM UTC+3, Oren Eini wrote:
Reply all
Reply to author
Forward
0 new messages