Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a searchable column userd in more then a list. When I search with the search server (by code or by web) my content it works well...

I need to use the same column "more times" in a query and obtain results like an logic AND.

I tried:

ColName: Val1 Val2 //but 2nd one is taken as a generic value not linked to the column

ColName: "Val1 Val2" //but is different from "Val2 Val1" and i need to be equal

ColName: Val1 ColName:Val2 //but works as an or

ColName: Val1+Val2 //but doesn't work at all..

Any suggestion? I tried to look at documentation, but is a little mess!

Thank you very much!

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

I think you'll need:

(ColName:Val1) AND (ColName:Val2)

Without the AND, yes, they are implicitly OR'd, as they're the same column. This is mentioned in the documentation, but it doesn't make it clear that you can explicitly AND them.

If the column names were different, they would be explicitly AND'd - but in exactly the same way you could explicitly OR them.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.