Re: [xwiki-users] SOLR and object search
On Mon, Nov 24, 2014 at 9:46 AM, Gerritjan Koekkoek wrote: Hi, I'm trying to understand the new SOLR search (i did not understand the old Lucene very well) My use-case is the following. We have a special FAQ application where the object has, amongst others, the following attributes: - Subject - Topic-group - Language - Question - Answer he default search returns page-title/name, but this is in our case a non-informational, generated by the system code. So instead of Page name we would like to show: Subject You have 3 options: (1) Use Velocity to output the value of the subject property in the FAQ title. See https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-blog/xwiki-platform-blog-ui/src/main/resources/Blog/BlogPostSheet.xml#L36 Gerritjan: Thanks this is helpful but see below (2) I doesn't make sense to have a separate String property to store the subject when you can store it in the document title. The designer of our FAQ has opted to store multiple objects of same class in one page. (because XWiki does not support "multiple locales (language-country)" on a object level. So the title must pick the subject name of the object of the current language-country combination. When we just display the subject we do not need to solve this challenge. (3) Customize the entire search page just to change the way the search results are displayed Yes I fear there is no way around this? As facets we would like to show Topic-group and Language, Default (on entering the page with search box) we would like to set the context-language as a search filter... So when reader is reading french the result only shows french FAQ (with a french subject title) if english only english. By checking and unchecking languages in the facets the user could extend or reduce the search. This is already the case with the default search. The context language is checked by default in the locale facet. See https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-ui/src/main/resources/Main/SolrSearchConfig.xml#L74 . It looks the context language is only looking at language attribute of page. We need to compare with attribute in object. I think it would be useful if some explanation is how the object-based facets can be defined. A challenge is the topic field, this is a list with translation key. So if user is french-language the list will show french topics, but if he/she check english as well in facets things get complicated. We have a business-rule that the english collection of FAQ's is the baseline, and most comprehensive. The other languages are only translations of the same. So another languages can not have a question not translated. So my question is: How to define the search http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Application#HForDevelopers http://design.xwiki.org/xwiki/bin/view/Design/SolrSchema http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Query+API http://lucene.apache.org/solr/ How to modify the output so page-title is no longer showing How to modify facets so only the two fields can be set See https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-faq/xwiki-platform-faq-ui/src/main/resources/FAQCode/FAQSearch.xml#L49 .This helps... Hope this helps, Marius ___ 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
Re: [xwiki-users] SOLR and object search
On Mon, Nov 24, 2014 at 9:46 AM, Gerritjan Koekkoek wrote: > Hi, > > I'm trying to understand the new SOLR search (i did not understand the old > Lucene very well) > > My use-case is the following. > We have a special FAQ application where the object has, amongst others, the > following attributes: > - Subject > - Topic-group > - Language > - Question > - Answer > > he default search returns page-title/name, but this is in our case a > non-informational, generated by the system code. So instead of Page name we > would like to show: Subject You have 3 options: (1) Use Velocity to output the value of the subject property in the FAQ title. See https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-blog/xwiki-platform-blog-ui/src/main/resources/Blog/BlogPostSheet.xml#L36 . (2) I doesn't make sense to have a separate String property to store the subject when you can store it in the document title. (3) Customize the entire search page just to change the way the search results are displayed > As facets we would like to show Topic-group and Language, > Default (on entering the page with search box) we would like to set the > context-language as a search filter... So when reader is reading french the > result only shows french FAQ (with a french subject title) if english only > english. > By checking and unchecking languages in the facets the user could extend or > reduce the search. This is already the case with the default search. The context language is checked by default in the locale facet. See https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-ui/src/main/resources/Main/SolrSearchConfig.xml#L74 . > > A challenge is the topic field, this is a list with translation key. So if > user is french-language the list will show french topics, but if he/she > check english as well in facets things get complicated. > We have a business-rule that the english collection of FAQ's is the > baseline, and most comprehensive. The other languages are only translations > of the same. So another languages can not have a question not translated. > > So my question is: > How to define the search http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Application#HForDevelopers http://design.xwiki.org/xwiki/bin/view/Design/SolrSchema http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Query+API http://lucene.apache.org/solr/ > How to modify the output so page-title is no longer showing > How to modify facets so only the two fields can be set See https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-faq/xwiki-platform-faq-ui/src/main/resources/FAQCode/FAQSearch.xml#L49 . Hope this helps, Marius > ___ > 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
[xwiki-users] SOLR and object search
Hi, I'm trying to understand the new SOLR search (i did not understand the old Lucene very well) My use-case is the following. We have a special FAQ application where the object has, amongst others, the following attributes: - Subject - Topic-group - Language - Question - Answer he default search returns page-title/name, but this is in our case a non-informational, generated by the system code. So instead of Page name we would like to show: Subject As facets we would like to show Topic-group and Language, Default (on entering the page with search box) we would like to set the context-language as a search filter... So when reader is reading french the result only shows french FAQ (with a french subject title) if english only english. By checking and unchecking languages in the facets the user could extend or reduce the search. A challenge is the topic field, this is a list with translation key. So if user is french-language the list will show french topics, but if he/she check english as well in facets things get complicated. We have a business-rule that the english collection of FAQ's is the baseline, and most comprehensive. The other languages are only translations of the same. So another languages can not have a question not translated. So my question is: How to define the search How to modify the output so page-title is no longer showing How to modify facets so only the two fields can be set ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users