Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Smart Search syntax View modes: 
User avatar
Certified Developer v6
Certified Developer v6
Dave - 5/30/2013 10:53:27 AM
   
Smart Search syntax
I'm trying to craft a smart search query that searches a single field for one of several values. I am able to get this to work:

(ProjectStatus:Cancelled ProjectStatus:Completed)

But this also matches documents that do not have ProjectStatus set to Cancelled or Completed. I want something like

(+ProjectStatus:[Cancelled OR Completed])

But I can't seem to find the appropriate syntax. Any ideas?

User avatar
Member
Member
Swainy - 5/31/2013 4:50:03 AM
   
RE:Smart Search syntax
Hi Dave,

Can you not add a where condition to the search? Then you can simply add in ProjectStatus = 'Cancelled' OR ProjectStatus = 'Completed'?

Thanks,

Matt

User avatar
Certified Developer v6
Certified Developer v6
Dave - 5/31/2013 8:09:46 AM
   
RE:Smart Search syntax
Hey Matt,

Unfortunately this is being implemented as a custom Search Filter control (using a target ISearchFilterable control), so I don't think we can use a simple WHERE clause. I believe it has to be a Lucene search syntax.

Thanks,
Dave

User avatar
Certified Developer v6
Certified Developer v6
Dave - 5/31/2013 8:13:25 AM
   
RE:Smart Search syntax
Not sure how I missed this, but this seems to work!

+ProjectStatus:(Cancelled OR Completed OR blahblahblah)

User avatar
Certified Developer v6
Certified Developer v6
Dave - 5/31/2013 8:14:44 AM
   
RE:Smart Search syntax
Dave wrote: Not sure how I missed this, but this seems to work!

+ProjectStatus:(Cancelled OR Completed OR blahblahblah)


As well as this:

+ProjectStatus:(Cancelled Completed blahblah)

User avatar
Member
Member
Swainy - 5/31/2013 10:27:59 AM
   
RE:Smart Search syntax
Perfect :)