![]() ![]() Migrating from Lucene 3 to 4 resulted in performance reduction In addition, we have lower level Lucene customizations like filters, callback based API for walking the index with no limits on number of retrievable matches and conversion of queries to filters for speed. Some searches will fetch a significant amount of documents from the result set, and also a significant amount of fields from each of those docs. These queries are usually not based on human input, but rather pre-coded, configured or built dynamically by the system. Our metadata queries use pure boolean algebra and filters on typed data fields, and most use some defined sorting order (but never score). We do not index full text content (instead dedicated Apache Solr instances are used for that purpose), and we do not use scoring. Our use of Lucene may be considered atypical, though. Up to this point, things look pretty standard. We gain flexibility and great speed by using Lucene instead querying the database through a SQL interface (the authoritive source of basically the same set of metadata that we index). It’s mostly about indexing metadata, which is used for lookups and all kinds of listing queries. ![]() We use the Lucene heavily in our Java-based CMS solution. If you just need to know how to to disable stored field compression, you can skip directly to the solution. Depending on factors such as server hardware and index update frequency, it may hurt performance if you have many small stored fields and/or your on disk index fits nicely in available OS cache memory in uncompressed form. This suits the most common usage scenarios of Lucene well, but is not always a win. The basic idea is that with some refinements to how compression is handled, disk I/O will often end up costing more time than the extra CPU cycles required to decompress data when retrieving documents from search results. Starting at version 4.1 of the Apache Lucene search library, compression of stored fields is enabled by default. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |