Developer forum

Forum » Development » Query content index in DW8

Query content index in DW8

Martin Grønbekk Moen
Martin Grønbekk Moen
Reply

Trying to find documentation on how to query the content index programatically, without using query publisher.

I have a Articles.Index (Dynamicweb.Content.ContentFulltextIndexProvider) and a Articles.Query.
Next I want to make a query using my Articles.Query, and the question is how do i do that using DW8.

I tried this.

Dynamicweb.Searching.Queries.SearchQuery q = new Dynamicweb.Searching.Queries.SearchQuery();
q.Add(new Dynamicweb.Searching.Queries.Criterias.Criteria("Keywords", "keyword"));
Dynamicweb.Searching.Queries.SearchResult<Dynamicweb.Searching.IndexEntry> res = Dynamicweb.Searching.IndexManager.Current.QueryIndex<Dynamicweb.Searching.IndexEntry>("Articles.index", q);

Without any luck...


Replies

 
Martin Grønbekk Moen
Martin Grønbekk Moen
Reply

I guess im using the old indexing in the above example. So I tried to use some DW9 code from here
http://doc.dynamicweb.com/forum/development/query-content-index-dw9-using-api?PID=1605

But then I cant find Dynamicweb.Indexing.Querying since it looks like that was added in DW9 version of the dll.
Is it at all possible to query the index in DW8?

 

You must be logged in to post in the forum