On Sat, Mar 11, 2017 at 9:20 AM, gp wang <cet...@msn.com> wrote:

> Thank you very much,Marius,but i noticed that in the link
> http://design.xwiki.org/xwiki/bin/view/Design/SolrSchema#HDocumentFields
> also mentioned "version:  We need to index the document version (revision,
> e.g. '2.4') to be able to detect when the index is not up to date (not in
> sync with the database). This check is performed at XWiki startup for
> instance (see IndexerJob#addMissing).",what does it means?


It explains the reason why we have to index the version. Because we want
"to be able to detect..."


> , can i make some changes of solr config file to achieve this?


The version is already indexed.
https://github.com/xwiki/xwiki-platform/blob/master/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/managed-schema#L179
.


>
> Solr Schema (Design.SolrSchema) - XWiki<http://design.xwiki.org/
> xwiki/bin/view/Design/SolrSchema#HDocumentFields>
> design.xwiki.org
> Other URLs. The Solr schema configuration file used in XWiki. Description.
> Introduction; Test Cases; Indexing a Single Entity vs. Multiple Entities; A
> Mixed Approach
>
>
>
>
> ________________________________
> From: users <users-boun...@xwiki.org> on behalf of Marius Dumitru Florea <
> mariusdumitru.flo...@xwiki.com>
> Sent: Wednesday, March 8, 2017 6:18 PM
> To: XWiki Users
> Subject: Re: [xwiki-users] How to search revision comment of a document in
> xwiki?
>
> The name of the corresponding Solr index field is "comment" (
> http://design.xwiki.org/xwiki/bin/view/Design/SolrSchema#HDocumentFields
> ).
> Solr Schema (Design.SolrSchema) - XWiki<http://design.xwiki.org/
> xwiki/bin/view/Design/SolrSchema#HDocumentFields>
> design.xwiki.org
> Other URLs. The Solr schema configuration file used in XWiki. Description.
> Introduction; Test Cases; Indexing a Single Entity vs. Multiple Entities; A
> Mixed Approach
>
>
> Note that only the last version of a document is being indexed. So each
> time you modify and save a document the corresponding row on the Solr index
> is updated. Thus you will be able to search only for the comment of the
> last revision.
>
> Hope this helps,
> Marius
>
> On Tue, Mar 7, 2017 at 10:33 PM, gp wang <cet...@msn.com> wrote:
>
> > Hi All,
> >
> >
> > How to search revision comment of a document in xwiki? Does solr index
> the
> > version info of a doc?
> >
> > I made a change of this page:
> > http://localhost:8080/xwiki/bin/edit/Main/SolrSearchConfig
> >
> > {{velocity output="false"}}
> > #set ($__defaultSolrConfig = {
> >   'queryFields': {
> >     'DOCUMENT': 'title^10.0 name^10.0 version^10.0
> >                  doccontent^2.0
> > ...
> >
> >
> > Thanks.
> >
> > wgp
> >
> >
>

Reply via email to