On Sun, Apr 24, 2016 at 11:34 PM, Ryszard Łach <ryszard.l...@unity.pl>
wrote:

> Hi, again.
>
> I still have problem with solr search, even with documents not touched by
> the language change. Steps to reproduce:
>
> 1. Create new page in Sandbox, name 'Sandbox.searchtest'
> 2. Enter single word in document content ('alamakota'), save
> 3. Try to search by this word - 0 results
> 4. Rename document into 'Sandbox.alamakota.WebHome'
> 5. Search again - 1 result (word found in Location).
>
> So, it seems the search does not work by document content. Search debug
> shows
>
> Parsed Query
>     +((objcontent_en:alamakota | objcontent_pl:alamakota |
> objcontent__:alamakota)^0.4 | spaces:alamakota^0.016 |
> creator_display:alamakota^0.08 | (title_en:alamakota | title_pl:alamakota |
> title__:alamakota)^10.0 | (doccontent_en:alamakota |
> doccontent_pl:alamakota | doccontent__:alamakota)^2.0 |
> attauthor_display:alamakota^0.016 | author_display:alamakota^0.08 |
> name:alamakota^10.0 | filename:alamakota^0.4 | (attcontent_en:alamakota |
> attcontent__:alamakota | attcontent_pl:alamakota)^0.4 |
> (comment__:alamakota | comment_en:alamakota | comment_pl:alamakota)^0.016 |
> (doccontentraw__:alamakota | doccontentraw_en:alamakota |
> doccontentraw_pl:alamakota)^0.4)
>
>
> It seems it does search by 'alamakota' word in objcontent_pl, but how can
> I find out why it does not find it?
>

The search query does include the document content

(doccontent_en:alamakota | doccontent_pl:alamakota |
doccontent__:alamakota)^2.0

The problem is that the Polish documents are not properly indexed because
the default Solr's schema.xml doesn't include configuration for the Polish
language.

https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-7.4.2/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-server/xwiki-platform-search-solr-server-data/src/main/resources/xwiki/conf/schema.xml#L255

You need to add

<dynamicField name="*_pl" type="text_pl" indexed="true" stored="true"
multiValued="true" />

and then you need to define the text_pl type (check the existing types).
See also
https://cwiki.apache.org/confluence/display/solr/Language+Analysis#LanguageAnalysis-Polish
. Once you have a working configuration it would be great if you could
share it with us by making a Pull Request on GitHub.

Hope this helps,
Marius


>
> TIA.
>
> R.
>
> On 2016-04-22 10:49, Ryszard Łach wrote:
> > Hi.
> >
> > I have a problem with solr search (Xwiki 7.2.4), I suppose it is
> language-related. My config is:
> >
> > Multilingual=no
> > Supported languages = pl
> > Default language = pl
> >
> > I have imported some documents (from .xar-s) from older xwiki instance.
> Most of them had (wrong) language - it was set to 'en' in old wiki. Because
> I want to clear up the new installation, I've changed
> 'xwd_default_language' for this documents in database to 'pl', restartex
> xwiki, removed solr index.
> >
> > Is it possible, that I missed something and it that's why I cannot find
> some documents by part of title?
> >
> > R.
> > _______________________________________________
> > users mailing list
> > users@xwiki.org
> > http://lists.xwiki.org/mailman/listinfo/users
> > .
> >
>
> --
>
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to