Sorry for the late reply.

On Fri, Sep 5, 2014 at 6:18 PM, Pascal BASTIEN <pbasnews-xw...@yahoo.fr> 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
> 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