How to search the text having space character in search condtion of smart search?

Prashant Verma asked on December 21, 2016 13:41

Hello Everyone,

I m using built in smart search result webpart, I m applying search condition. Example for search condition: +status:(Not Accredited) not working.

Instead of using search condition
+status:(NotAccredited) as filter then it works

Image Text

Please help me out what I missed out in rewriting the smart search syntax.

Recent Answers


Dragoljub Ilic answered on December 21, 2016 14:32 (last edited on December 21, 2016 15:11)

Hi Prashant,

You can search it by adding escape '\' character, f.e.:

+status:(Not\ Accredited)

or

+status:"Not Accredited"

And make sure that you are using appropriate Analyzer type (f.e. White space or something...).

Can you verify is that field that you want to search exist in you search index? Go to search fields and verify that you checked 'content' and 'searchable' on that status field. Also, you can use Apache Lucene to see exactly indexed fields inside indexer.

1 votesVote for this answer Mark as a Correct answer

Peter Mogilnitski answered on December 21, 2016 15:15 (last edited on December 21, 2016 15:39)

Smart search index by default contains skuinternalstatusid (i.e. internal status) and skupublicstatusid (i.e Public status) I am assuming you want to get products according to one of those: so for exmaple to get bestsellers you can do +skupublicstatusid: (int)1 internal and public statuses are stored in corresponding tables:

select * from COM_PublicStatus
select * from COM_internalStatus

You have search syntax examples here: NewsTitle:"New features" - returns the news document titled New features.

P.S. if searching some custom field - make sure it is in the index .

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.