This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Is it possible to add a means of retrieving a list of entity IDs from Lucene without populating the entities? It seems that the search engine first retrieves a list of IDs from Lucene, and then builds an SQL query with these in an IN clause to retrieve the entities: SELECT From the public API this is all one operation - there's no way to intercept the list of IDs returned from Lucene without populating entities. I realise you can specify filtering and paging as part of the Query object, but all my other repository methods are built using IQueryable, and I have achieved some really efficient filtering and paging operations as a result. If I could just get that list of IDs from Lucene they could be added as a filter to an IQueryable. |
|
|
Thanks for your feedback. We will have a look at enhancing the query API to provide just the ID's if desired. I'll update this thread with the changes that get made. Can I assume this is not a critical issue but more just to ensure that your code is as efficient as possible? Kind regards, John-Daniel Trask |
|
|
Absolutely, this is is just a performance enhancement.
|
|
|
Hi, I've commited a basic enhancement to LightSpeed's Search API to perform this type of query. Here's out it can be done: var query = new Query { SearchQuery = "video OR Mindscape" }; Note: You must set IdentifiersOnly to true, you must not provide any other query filtering (paging, sorting, etc) as these would require database evaluation. The returned collection will contain SearchResult items which you will need to parse to retrieve the ID's (the Entity itself will, of course, be null). This should be available in the next nightly build release at approximately 14:30 GMT. I hope that helps. |
|
|
Superb, thanks very much
|
|