On Mon, Jul 14, 2014 at 3:53 PM, Ryszard Łach <[email protected]> wrote: > Hi. >
> Is there a document describing prefetred settings to have xwiki and solr-based > search working well for non-multilingual, non-en documents? No. I don't see anything related neither on http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+API nor on http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Application . > > I have a problem with solr search (xwiki 5.3). My language settings are: I'd recommend you to upgrade to a more recent version, 5.4.5 is probably the safest. > > multilingual: no > supported languages: pl,en If multilingual is set to No then the list of supported languages should have only one language. > default language: - I'm testing with different values here > > and in xwiki.cfg: > > xwiki.language.preferDefault=1 > xwiki.language.forceSupported=1 > > Test no 1: > default language: pl > > When I create new document, it has (in database) xwd_language = '' and > xwd_default_language = 'pl' - so it looks ok: > > > xwd_fullname | xwd_language | xwd_default_language > ---------------------------------+--------------+---------------------- > Sandbox.SzukajWNazwieStronyTest | | pl > > I try to search on 'SzukajWNazwie' - solr suggest does suggest this page, but > entering search result the result list is empty. > > If i try searching by document content - both search suggest and search result > list are empty. > > When I change > > default language: en > and create a document, it has properties: > > xwd_fullname | xwd_language | xwd_default_language > ------------------------------+--------------+---------------------- > Sandbox.SearchInPageNameTest | | en > > Then: > > 1. Suggest does find the document by its name, search does too > 2. Suggest does not find the document by its content, but search does. > > Searching of polish document works as before the change > > I'm a little bit confused, I cannot see any consistent rule in the behavior. > Thanks in advance for any tips. By looking at the Solr schema for 5.3, https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-5.3/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/resources/solr/conf/schema.xml#L222 , I see that there is no special analyzer defined for the Polish language. e.g. https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-5.3/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/resources/solr/conf/schema.xml#L728 . This means your Polish wiki pages will be indexed as plain strings, no special treatment, which would explain the behaviour you are encountering. Now, most of the Solr schema configuration file we have in XWiki is taken from the Solr example schema distributed with Solr. I see that even the latest version of Solr doesn't have an analyzer for Polish defined by default, see http://svn.apache.org/viewvc/lucene/dev/trunk/solr/example/solr/collection1/conf/schema.xml?view=markup . I would ask on the Solr mailing lists for the recommended configuration for the Polish language. Then you can add that configuration to the Solr schema file used by XWiki (should be found somewhere in the solr folder inside your configured permanent directory). Hope this helps, Marius > > Best Regards, > > R. > > _______________________________________________ > users mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/users _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
