Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

KeywordQuery SourceID and QueryText don't work together

$
0
0

Hi,
I try to use a KeywordQuery (Microsoft.Office.Server) in my sharepoint farm solution.
The KeywordQuery should use a search text and a "Result Source".
The "Result Source" contains a path to a adocument library.

keywordQuery.SourceId = new Guid("0784f7ad-20aa-4ee9-8f61-29ae4ed22aa6");
keywordQuery.QueryText = searchText;

When I execute the query I get all the items of the library defined in the "Result Source".
The results from  QueryText are ignored.
If I do no use the SourceID, the condition of the QueryText works fine.
What do I have to change that the QueryText and the SourceID works together ?

Thanks
Stephan


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>