Je suis nouveau dans SolrNet et Asp.Net aussi :) s'il vous plaît me frapper avec réponse, HOWTO configurer SolrNet pour les formulaires Web.Solrnet avec Web Forms
400 http error http://clip2net.com/clip/m12007/1276888290-clip-13kb.png
public partial class CreateIndex : System.Web.UI.Page {
//http://localhost:8983/solr
private static readonly string solrURL = ConfigurationManager.AppSettings["solrUrl"];
protected void Page_Load(object sender, EventArgs e) {
var connection = new SolrConnection(solrURL);
Startup.Init<SolrProductDTO>(connection);
Entities db = new Entities();
var index = (from i in db.ItemBases.OfType<Product>()
where i.Quantity != null && i.Category != null
select new SolrProductDTO()
{
Category = i.Category.Name,
Id = i.Id,
InStock = i.IsDeleted,
Timestamp = i.CreatedDate,
Description = i.Description,
Title = i.Name
}).ToList();
var solr = ServiceLocator.Current.GetInstance<ISolrOperations<SolrProductDTO>>();
solr.Delete(SolrQuery.All);
solr.Add(index);
solr.Commit();
}
vient ici mon DTO:
public class SolrProductDTO {
[SolrUniqueKey("id")]
public int Id { get; set; }
[SolrField("cat")]
public string Category { get; set; }
[SolrField("title")]
public string Title { get; set; }
[SolrField("desc")]
public string Description { get; set; }
[SolrField("inStock")]
public bool InStock { get; set; }
[SolrField("timestamp")]
public DateTime Timestamp { get; set; }
}
S'il vous plaît aider !!!!
Exécutez-vous Solr via la console? (c'est-à-dire 'java -jar start.jar'?) Vérifiez le journal de la console Solr. –
J'utilise LucidWorks => Solr sous Apache Tomcat. – omoto
pouvez-vous vérifier le journal Solr et afficher le message d'exception complète? –