0

So as an example let’s take the Title field and assume i want to set up a web part to display documents related to the search term American Civil War.

The contains all of option would let me display documents that had all 3 words in the title i.e. the implied condition would be American AND Civil AND War
The contains any of option would give me any document where any of those words appear i.e. American OR Civil OR War

Both of these would be irrespective of the order of the words or any additional words that appeared

I need to create caml query in sharepoint 2010? Is there a direct way or better way to handle this above scenario?

Purnil Soni
  • 831
  • 4
  • 18
user1899731
  • 61
  • 2
  • 5

1 Answers1

1

I'm afraid you will have to create multiple AND clauses with CONTAINS operator to achieve the desired contains ALL of behaviour. The same applies to multiple OR clauses with CONTAINS operator needed to archieve the contains ANY of behaviour.

tomasdeml
  • 339
  • 2
  • 7