SearchEngineTextMatcherEditor with substrings of fields

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

SearchEngineTextMatcherEditor with substrings of fields

Clayton Carter-2

As I am currently reading the javadoc, I don't see a way (or can't find a way) to have SearchEngineTextMatcherEditor match field names & TextFilterators based on leading substrings of the field names.

For example, I would like to have all of the following lines all match "Clayton" against the "name" field:

n:Clayton
na:Clayton
nam:Clayton
name:Clayton

Aside from adding a SearchEngineTextMatcherEditor.Field for each substring, is there a way to enable this shorthand style matching?

Clayton
Reply | Threaded
Open this post in threaded view
|

Re: SearchEngineTextMatcherEditor with substrings of fields

James Lemieux
Hey Clayton,

   It has been many moons since I wrote that class, but if memory serves, there isn't a way to do what you're asking for.

   In retrospect, perhaps the "key" should have been an arbitrary regex rather than an exact match, and we would just trust the API user to choose a set of regular expressions that don't overlap and cause ambiguity.

James


On Fri, Mar 7, 2014 at 10:00 AM, Clayton Carter <[hidden email]> wrote:

As I am currently reading the javadoc, I don't see a way (or can't find a way) to have SearchEngineTextMatcherEditor match field names & TextFilterators based on leading substrings of the field names.

For example, I would like to have all of the following lines all match "Clayton" against the "name" field:

n:Clayton
na:Clayton
nam:Clayton
name:Clayton

Aside from adding a SearchEngineTextMatcherEditor.Field for each substring, is there a way to enable this shorthand style matching?

Clayton

Reply | Threaded
Open this post in threaded view
|

Re: SearchEngineTextMatcherEditor with substrings of fields

Clayton Carter-2

OK.  Thanks, James.  I have a fairly short set of keys, so it's not a big deal to duplicate them as individual substring keys.  I just didn't want to do something silly if GL had something buried in it to do the trick already -- as it often does!

Thanks again!

Clayton



On Fri, Mar 7, 2014 at 1:53 PM, James Lemieux <[hidden email]> wrote:
Hey Clayton,

   It has been many moons since I wrote that class, but if memory serves, there isn't a way to do what you're asking for.

   In retrospect, perhaps the "key" should have been an arbitrary regex rather than an exact match, and we would just trust the API user to choose a set of regular expressions that don't overlap and cause ambiguity.

James


On Fri, Mar 7, 2014 at 10:00 AM, Clayton Carter <[hidden email]> wrote:

As I am currently reading the javadoc, I don't see a way (or can't find a way) to have SearchEngineTextMatcherEditor match field names & TextFilterators based on leading substrings of the field names.

For example, I would like to have all of the following lines all match "Clayton" against the "name" field:

n:Clayton
na:Clayton
nam:Clayton
name:Clayton

Aside from adding a SearchEngineTextMatcherEditor.Field for each substring, is there a way to enable this shorthand style matching?

Clayton