我无法将文档添加到以云模式创建的Lucene Solr 7.3。
以下命令用于使用默认值启动lucene solr
start solr -e cloud
我添加的包裹是
Install-Package SolrNet.Cloud -Version 1.0.8
Install-Package SolrNet.Cloud.Unity -Version 1.0.8
下面是我的示例程序
class Program
{
static void Main(string[] args)
{
var zookeeperConnectionString = "http://localhost:8983";
var collectionName = "collection_name";
Startup.Init<Product>(zookeeperConnectionString);
var p = new Product
{
Id = "SP2514N",
Manufacturer = "Samsung Electronics Co. Ltd."
};
var solrCloudMode = ServiceLocator.Current.GetInstance<ISolrOperations<Product>>();
solrCloudMode.Add(p);
solrCloudMode.Commit();
Console.ReadKey();
}
}
class Product
{
[SolrField(FieldName = "Id")]
public string Id { get; set; }
[SolrField(FieldName = "Manufacturer")]
public string Manufacturer { get; set; }
}
我在添加功能中遇到错误 找不到404页
我不明白为什么它会出现在URL下方 http://localhost:8983//update?version=2.2&wt=xml