Help with FTS query language case insensitive search

cancel
Showing results for 
Search instead for 
Did you mean: 
Renestox2
Active Member

Help with FTS query language case insensitive search

Hello

 

I have a Query in CMIS that i want to be Case-Insensitive:

TYPE:"aa:document" AND =cm:creator:exampleuser AND (@aafi:recipient:"example")

@aafi:recipient is my custom Index Field in Solr (Datatype Text)

How do i Convert @aafi:recipient:"example" into FTS Query Syntax ?

I've tried "CONVERT(cm:name:aafirecipient=example)" and a lot of things but either i just get every Document returned or an Error from SOLR. Maybe someone can help me with this one?

4 Replies
afaust
Master

Re: Help with FTS query language case insensitive search

I don't quite understand where your problem lies. The query

TYPE:"aa:document" AND =cm:creator:exampleuser AND aafi:recipient:example

would already be a FTS query for a term and would be executed in a case insensitive manner on the SOLR side of things provided your field is defined to be indexed in the content model.

I am not sure of where you found the CONVERT example - I have never seen something like this with regards to Alfresco SOLR or CMIS/FTS query conversions.

kaynezhang
Advanced

Re: Help with FTS query language case insensitive search

TYPE:'aa:document' AND =cm:creator:exampleuser AND aafi:recipient:'example'

Please refer to https://docs.alfresco.com/6.0/concepts/rm-searchsyntax-intro.html

Renestox2
Active Member

Re: Help with FTS query language case insensitive search

 But this query is not Case-insensitive for me. Am i missing any settings or something else ?

kaynezhang
Advanced

Re: Help with FTS query language case insensitive search

You should set tokenised to true or both in your aafi:recipient property definition .

In order to make the already existing nodes work ,you also need to rebuild your index

				<property name="aafi:recipient">
					<title>****</title>
					<description>****</description>
					<type>d:text</type>
					<mandatory>false</mandatory>
					<index enabled="true">
						<atomic>true</atomic>
						<stored>false</stored>
						<tokenised>both</tokenised>
						<facetable>true</facetable>
					</index>
				</property>