0

I'm trying to use analyzers with Magnolia CMS version 6.1.1 (Community edition) to make searchs with same result with words like "Sánchez" and "Sanchez", or even lowercase searches like "sánchez" or "sanchez" or something like that, but documentation is too poor. (ASCIIFoldingFilter and LowerCaseFilter).

I'm using PostgreSQL, and i have put <param name="analyzer" value="org.apache.lucene.analysis.es.SpanishAnalyzer"/> in jackrabbit-bundle-postgres-search.xml file and my "searchIndex" in the same file is like <SearchIndex class="info.magnolia.jackrabbit.lucene.SearchIndex">.

I have tried to delete index folders (clean indexation) in the "repositories" folder under my webapp folder for custom repositories.

Which libraries have to add to the pom.xml? Which steps must I follow? Which files have I to modify to make "accent and lowercase insensitive" queries with JCR (using "javax.jcr.query.QueryManager" and "javax.jcr.query.Query")?

Thanks for all your answers.

slynk
  • 1

1 Answers1

0

Magnolia has its own info.magnolia.jackrabbit.lucene.SearchIndex class which is used throughout the system. If you want a custom analyzer you should set it in the constructor of that SearchIndex or feel free to extend it and set it there.

That should be all because system is already configured to use that class, if you plan to extend it then you should change it as well in the search configuration to use your extended class as search index.

Hope that helps,

Cheers,

Ducaz035
  • 3,054
  • 2
  • 25
  • 45
  • Hi! Thank you for your answer... I could see you are working for Magnolia... could you bring me some docs or link to magnolia docs where i could leran to make all of this? Thank you! :) – slynk Mar 25 '20 at 07:20
  • Cheers, Sure, have a look at this: https://wiki.magnolia-cms.com/display/WIKI/Search+Index+Configuration+File – Ducaz035 Mar 25 '20 at 11:02