我有一个与日期字段排序有关的问题我有日期字段被索引为一个字符串,看起来像“5/2/2008 4:33:30 PM”我想在这个字段的基础上进行排序日期,时间不重要。任何建议我怎么可以忽略来自这个领域的时间部分,只是排序日期?Solr DateField相关的问题?
0
A
回答
3
我会创建另一个专门用于此目的的字段,当您填充它时,您只需将时间从数据源中删除,然后在此字段上排序。
0
我同意Mauricio,我们是一个单独的领域。但我还建议记住Solr模式示例中解释的更新字段类型(请参见下文)。特别是如果你将缺少文件的日期数据,并需要排序的第一个/最后一个。
`Note:
These should only be used for compatibility with existing indexes (created with older Solr versions)
or if "sortMissingFirst" or "sortMissingLast" functionality is needed. Use Trie based fields instead.
Plain numeric field types that store and index the text
value verbatim (and hence don't support range queries, since the
lexicographic ordering isn't equal to the numeric ordering)
<fieldType name="pdate" class="solr.DateField" sortMissingLast="true" omitNorms="true"/>`
相关问题
- 1. solr DIH - 关于solr delta-imports的问题
- 2. lucene/solr中词组搜索相关的问题?
- 3. 关于Solr缓存机制的问题
- 4. Solr中的相关搜索
- 5. 的Django 1.4的DateField和SQLite问题
- 6. viewWillAppear相关问题
- 7. setContentsURL相关问题
- 8. StringBuilder相关问题
- 9. StringBuilder相关问题
- 10. LINQ相关问题
- 11. TableLayout相关问题
- 12. MVC相关问题
- 13. 堆相关问题
- 14. jquery相关问题
- 15. Pearson相关问题
- 16. stackoverflow“相关问题”
- 17. DOM相关的问题和问题
- 18. 与C++相关的问题有问题
- 19. 与JComboBox相关的问题
- 20. SUBSTRING相关的问题
- 21. 与UIButton相关的问题
- 22. 与UITabelViewCell相关的问题
- 23. Stackoverflow的相关问题
- 24. OOP相关的问题
- 25. 与UITextView相关的问题
- 26. 与UNUserNotificationSettings相关的问题
- 27. 泛型相关的问题
- 28. 与getElementByTagName相关的问题
- 29. 与errno.h相关的问题
- 30. 与os.popen相关的问题