Thxs a lot for this detailled explaination and these links: it helps my tiny 
xwiki knowledge. :-)

If I want looking for a string in all my fields on my EAClass, I must add all 
my fields in
set ($solrConfig = {
        'queryFields': 'title^3 
property.Formulaires$20SMQ.EAClass.A_ExpertsAutre 
property.Formulaires$20SMQ.EAClass.MyField 
property.Formulaires$20SMQ.EAClass.AnotherField   
property.Formulaires$20SMQ.EAClass.AnotherOne',
or I can use something like this ?
    'queryFields': 'title^3 property.Formulaires$20SMQ.EAClass.*


________________________________
 De : Marius Dumitru Florea <[email protected]>
À : Pascal BASTIEN <[email protected]>; XWiki Users <[email protected]> 
Envoyé le : Lundi 15 septembre 2014 14h59
Objet : Re: [xwiki-users] Solr and blank characters
 

Sorry for the late reply.

On Fri, Sep 5, 2014 at 6:18 PM, Pascal BASTIEN <[email protected]> wrote:
> Hello,
> I try to writing a search page in my application, but unfortunaly I used bank 
> characters in my spave name :-(
> I try to applie this method:  
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Application#HSearchUIConfiguration
>  without succes.

> I tried to replace blank with + character and/or add " character or '

No. It doesn't work like this. See
http://design.xwiki.org/xwiki/bin/view/Design/SolrSchema#HEncodingDynamicFieldNames
and 
http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki53RC1#HSearchforDocumentsMatchingSpecificValuesinMultipleXObjectProperties
:

"We're using an encoding scheme similar to the URL-encoding to support
special characters in the Solr index field names"

>
> The result is an error or no search result...
>
> Have you got a tip to escape blank character in my code?
>
> {{include reference="XWiki.SearchCode"/}}
>
> {{velocity output="false"}}
> #if ($searchEngine == 'solr')
>   ## Customize the Solr Search UI for the application.
>   #set ($solrConfig = {

>     'queryFields': 'title^3 property.Formulaires+SMQ.EAClass.A_ExpertsAutre',

'queryFields': 'title^3 property.Formulaires$20SMQ.EAClass.A_ExpertsAutre',

>     'facetFields': ['creator', 'creationdate', 'author', 'date', 'mimetype', 
> 'attauthor', 'attdate', 'attsize'],
>     'filterQuery': [
>       'type:DOCUMENT',
>       "wiki:$xcontext.database",

>       "space_exact:Formulaires+SMQ",
>       'class:Formulaires+SMQ.EAClass'

These are different. See
https://wiki.apache.org/solr/SolrQuerySyntax#Default_QParserPlugin:_LuceneQParserPlugin

"Certain characters are special and those characters need to be
escaped using quotes or a backslash if you want them to be treated as
literals."

This works for me:

'space_exact:"Formulaires SMQ"',
'class:"Formulaires SMQ.EAClass"'

Hope this helps (next time :) ),
Marius


>     ]
>   })
> #end
> {{/velocity}}
>
> {{velocity}}
> {{include reference="$searchPage"/}}
> {{/velocity}}
>
>
>
>
> Thxs
>
> Pascal B
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to