3
RavenDbの埋め込みインスタンスに格納されている文書が300万件近くあります。フィールドの誰もが何らかのタイプのフィルタ/クエリ/ソートを受けますが、特に私はinfoとinfo2カラムのインテリジェントなテキスト検索をしたいと思っていました。 RavenDbインデックスを構築するにはどうすればよいですか?これらの要件を前提に、この文書のRavenDb静的インデックスを構築するにはどうすればよいですか?
私の最初のパスはinfo2です。
store.DatabaseCommands.PutIndex("ProdcustByInfo2", new IndexDefinitionBuilder<Product>
{
Map = products => from product in products
select new { product.INFO2 },
Indexes = { { x => x.INFO2, FieldIndexing.Analyzed } }
});
は、ありがとう スティーブン
[Serializable]
public class Product
{
public string AveWeight { get; set; }
public string BrandName { get; set; }
public string CasePack { get; set; }
public string Catalog { get; set; }
public decimal CatalogId { get; set; }
public decimal CategoryId { get; set; }
public string Info { get; set; }
public bool IsOfflineSupplierItem { get; set; }
public bool IsRebateItem { get; set; }
public bool IsSpecialOrderItem { get; set; }
public bool IsSpecialPriceItem { get; set; }
public bool IsTieredPricingItem { get; set; }
public string ItemNum { get; set; }
public string ManufactureName { get; set; }
public string ManufactureNum { get; set; }
public decimal OffineSupplierId { get; set; }
public string PackageRemarks { get; set; }
public decimal Price { get; set; }
public decimal PriceGroupId { get; set; }
public decimal ProductId { get; set; }
public string ProductName { get; set; }
public int Quantity { get; set; }
public string SupplierName { get; set; }
public string UOM { get; set; }
public string Upc { get; set; }
public string Url { get; set; }
}
私はその件について読んでいましたが、ちょうど質問がありました。 http://ravendb.net/docs/client-api/querying/static-indexes/defining-static-index –