This is the first time I have used Examine - So far this is working, results variable have the correct data, however what I want to do is add the searchTerm variable I want to search all feilds of all nodes that currently are returned in var results
Any Ideas? - Thanks in advance.
var searchEngine = ExamineManager.Instance.SearchProviderCollection["ExternalSearcher"];
var criteria = searchEngine.CreateSearchCriteria(BooleanOperation.Or);
IBooleanOperation query = criteria.NodeTypeAlias("level1")
.Or().NodeTypeAlias("level2")
.Or().NodeTypeAlias("simpleTextPage")
.Or().NodeTypeAlias("contactPage")
.Or().NodeTypeAlias("Locationfinder");
string searchTerm = "Term to Search for here";
var results = searchEngine.Search(query.Compile());
Your query would end up being very big, however what you can do is implement gathering node data event then re index to put all the content into one field called contents then you can do search like,
Using Examine Manager to search content
Hey guys,
This is the first time I have used Examine - So far this is working, results variable have the correct data, however what I want to do is add the searchTerm variable I want to search all feilds of all nodes that currently are returned in var results
Any Ideas? - Thanks in advance.
Ayo,
Your query would end up being very big, however what you can do is implement gathering node data event then re index to put all the content into one field called contents then you can do search like,
You can see how to do this in this blog post http://thecogworks.co.uk/blog/posts/2012/november/examiness-hints-and-tips-from-the-trenches-part-2/
Regards
Ismail
is working on a reply...