I was trying Lucene.net for applying fulltext search and was able to use it with the helpof this link http://www.codeproject.com/Articles/320219/Lucene-Net-ultra-fast-search-for-MVC-or-WebForms
but the it has an example only for some simple data
while i m having a scenario where the two entities are linked with one-to-many relation.
class Product
{
public int Id{get;set;}
public int Name{get;set;}
}
class Shop
{
public int Id{get;set;}
public int Name{get;set;}
public List<Product> Products{get;set;}
}
now implementing/(storing this in index as a single table or doc) this is a bit tricky.
Should i create two documents for index?
but then linking would be a problem, if the search was made in Product
and it will return result with only Product
and not shops.
What is the way out of it? or some other way?
--EDIT---
need to store these 1:N related data in single document as i would be giving the search on any of the field from both the entities.
So even after the result is returned by lucene it has the id available for both entities.