eZ Community » Forums » Extensions » ezfind solr_escape with wildcards
expandshrink

ezfind solr_escape with wildcards

ezfind solr_escape with wildcards

Thursday 20 August 2015 10:38:02 am

After upgrading ezfind I run into a problem for following query: 

meta_main_path_string_ms:/1/2/90/*

That's not working anymore. The forward slash is not listed as special
char[1]. But that's wrong in case that char is at the beginning. I
assume solr thinks you want to start a regular expression. So
following is working:

meta_main_path_string_ms:\/1/2/90/*

In that context I found the ezfind template operators "solr_escape"
and "solr_quote" -- but it's not helping me much:

meta_main_path_string_ms:"/1/2/90/326394/891850/918740/918738/"   [works]
meta_main_path_string_ms:"/1/2/90/*"  [breaks]
meta_main_path_string_ms:"/1/2/90/*"  [breaks]
meta_main_path_string_ms:"\/1/2/90/*"  [breaks]
meta_main_path_string_ms:"\/1/2/90/"*  [breaks]

So I have no idea how to get the combination of quotes and wildcards
to work. What am I missing here?

I'm considering to implement another escape operator which is not adding quotes but escapes a list of characters. For example:

meta_main_path_string_ms:\/1\/2\/90\/*  [works]

But maybe I don't fully understand how the quoting is working, so it might not be necessary.

Modified on Thursday 20 August 2015 10:41:43 am by Philipp Kamps

No reply yet!

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from