English 中文(简体)
solrj:利用POJO,无地
原标题:solrj: using a POJO with non-string fields

I m Brand-new to ́r 和 ́rj, 并把它们当作一种潜力,用于搜索-导向。

我们在MongoDB的案例中拥有大量数据,在Java界定了偷渡。 我愿利用我现有的MongoDB POJOs,通过增加solrj ,将数据移至索尔。 外地说明。

这似乎对“强硬”领域做了罚款,但对于 in来说,这并不大:

org.apache.solr.common.SolrException: ERRORunknown_field_downloadsCount

是否有一种简单的办法来自动测绘(以及可能的其他非铺设类型)到强硬?

我猜想,我只能改变我的班子。

@Field("downloadCount")
String getDownloadCountAsString() { return Integer.toString(downloadCount); }

但我很想知道,是否有一个更为有力的解决办法。

最佳回答

错误表明,你没有下载次数。 Solr schema的田地数。 检查你的chem。

问题回答

暂无回答




相关问题
solr problem to get the field names

Ive got a problem. In each document I ve got fields: threads.id and posts.id. I want to get the field name value for them so i can get data from the database. Between the lines beneath i have marked ...

Which is the better client for Solr + PHP?

I have two options http://www.php.net/manual/en/book.solr.php http://code.google.com/p/solr-php-client/ I read it somewhere that that 2) use JSON as output types whereas 1) use XML doc. Isn t ...

Geronimo vs Glassfish

For a production environment, is Apache Geronimo better for applications that uses ActiveMQ, Derby, Solr?

Sort by date in Solr/Lucene performance problems

We have set up an Solr index containing 36 million documents (~1K-2K each) and we try to query a maximum of 100 documents matching a single simple keyword. This works pretty fast as we had hoped for. ...

SOLR - delta import not with last_modified

I saw only ways using delta import with last_modified. Is there some other ways to do delta_imports withut using timestamps? For example, if i have unique key(integer), can i tell SOLR to index only ...

SOLR How to return only limited matched content

ok guys, say in my Schema I have 4 fields: <field name="SiteIdentifier" type="string" indexed="true" stored="true" required="true"/> <field name="Title" type="text" indexed="true" stored="...

Solr - character substitution

I have Solr with indexed database. In my database all data is in Latvian. The problem is, I need to be able to search word Riga as if it is word Rīga. Of course, i can define synonym - Rīga = Riga, ...