I have a simple document structure such as:
public class CulturedData
{
public string Culture { get; set; }
public string Text { get; set; }
}
public class Product
{
public int Id { get; set; }
public decimal Price { get; set; }
public List<CulturedData> Titles { get; set; }
public List<CulturedData> Descriptions { get; set; }
}
Culture = "EN" or "DE" or "FR" etc.
I am wondering the best way to keyword search for products using their respective Text properties. The Text content for Descriptions could be quite large, maybe 20-30K. What is the best way to index this sort of data, and would I need a separate index for each culture?
It would also be nice to use the More Like This feature, so does this mean I am forced down a particular indexing path?
Any further questions/explanation please ask.
Regards Phil
You can use a single index, like this:
from p in products
select new
{
_ = p.Titles.Select(x=>CreateField("Titles_" + x.Culture, x.Text)),
_+ = p.Descriptions.Select(x=>CreateField("Descriptions_" + x.Culture, x.Text)),
}
And that should give you what you want.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.