[ome-devel] search patterns including lucene's special characters

Josh Moore josh at glencoesoftware.com
Tue Nov 30 15:48:16 GMT 2010


Hi Bernhard,

On Nov 30, 2010, at 3:00 PM, Bernhard Holländer wrote:
> I have a problem using search patterns including '-' characters in the
> name field. For instance, I have a project name like this
> project_name='test-project-a-b-c'; running a search with
> findAllByFullText with a pattern like this
> pattern="name:test\-project*" dos not yield the projects with names
> like the one above.
> 
> Is this a know problem in Omero4.1?

The issue exists in 4.2 as well, though apparently it affects more queries than I thought. You might take a look at http://trac.openmicroscopy.org.uk/omero/ticket/3164 which I've updated with several examples similar to yours which also fail.

The problem is caused by a different Lucene analyzer being used when a wildcard is present, since the standard analyzer handles punctuation in one way, and the wildcard analyzer in a different way. As you can see in the examples, avoiding a punctuation/wildcard mix often helps.

We don't yet have a solution for this which won't make other queries start failing, but any input about the various trade-offs, user preferences/assumptions, etc. are very welcome.

Cheers,
~Josh


More information about the ome-devel mailing list