Alfresco and Solr filter query support.

Se encuentra usted aquí

3 envíos / 0 nuevos
Último envío
Alfresco and Solr filter query support.


I've added some customisations to the Alfresco/Solr code (4.0 enterprise) to support filter queries. I have created a custom field using the copy field pattern in the schema.xml, the type of the custom field is 'string' as I need a verbatim copy of the field.

In CoreTracker I can see the field is created using:


so when I build my filter query string I'm using the same method, but nothing is returned. If I change the first '\u0000' to a wildcard character i get the results I expect, i.e.


Viewing the field in Luke or the Solr's schema browser only displays the field with empty spaces, i.e. ' en myfield'

Does anyone know why nothing is returned if '\u0000' is placed before the locale in a filter query, or what should be placed before the locale as I don't what to use wildcard characters in my query.



Re: Alfresco and Solr filter query support.


We should add filter queries.
Sometimes you miss the obvious!

Extending your schema has lost how the locale is processed in Alfresco.
You would need tokenisation that stripped it.

You would be better making your property dual tokenised "both" or tokenised "false" in your data model
You can then filter using = for exact and ~ for FTS matching


Andy Hind
Alfresco Development

Re: Alfresco and Solr filter query support.

Thanks Andy.

I managed to getting it working by using the Lucene query parser instead of the Alfresco query parser.


Are you planning to release any documentation on the Alfresco and Solr implementation?


forums index