I have modified my cfg to disable caching and now the newly created resources are only found in search after I restart my web application. I thought that if the caching is disabled then the index is searched from database everytime...below is my config
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Compass 2.0.2 does not supprt property place holders while using compass namespace handler. The support was added only from 2.1.x onwards.
In the next release 4.5 or 5.0, we need to migrate to 2.1.x of compass and then we can start using spring-compass-online-2.0.1.xml
<bean id="compass" class="org.compass.spring.LocalCompassBean">
<!-- Jdbc Directory Settings
Compass opens <b>new thread</b> for performing certain tasks, such as
deleting MarkDeleted rows. When used from a webapp (WebSphere), this is
causing connection leaks due to the fact that WAS doesn't (from IBM PMR)
allow to commit transactions from the new thread.
The scheduler is disabled by setting the compass.engine.indexManagerScheduleInterval to -1.
However, the scheduled tasks still need to be executed. This can be performed by invoking
<!-- Optimizer settings-->
This is set to false to reduce the time taken to save. When an insert/update changes the index, it automatically
invalidates the internal cache, that way all the search results are always up to date. But it can have some
negative impact on the index performance. http://issues.compass-project.org/browse/CMP-218
<!-- Use non compound index format when using JDBC Directory -->
<!-- Customize locking mechanism to handle PhantomRead exceptions: interval is in millis and timeout is in seconds -->
<!-- turn it off -->
<!-- Mark resources for deleting. Actual deletion will be done by a shceduled program -->
<!-- Cache the index in RAM. We can also use File System based cache
Since the cache update and invalidation is happening using a thread pool executor
(ScheduledThreadPoolExecutor) and since WebSphere doesnt propogate transactional context to
a non-container managed thread etc etc...this has to be disabled to avoid connection
leaks while using JNDI based DataSource
<property name="dataSource" ref="localTestDataRepo" />
<bean id="compassIndexerDao" class="com.equifax.ic.tdp.framework.search.CompassDaoIndexer">
<ref local="compass" />
Hi Shay - yes i am using compass 2.0.2. Below is my use-case..let me know the best way to handle this
User creates a new resource using web-form
App saves it in the index
User goes to the search page and enters search query....here is the problem....the newly saved resource is not found or returned as part of the results...it is found however after restarting the applications
I have to disable cache invalidation because this operation is being performed in async using threads and this is causing connection leaks (as i reported earlier)...u gave me a way to specify external WorkManager but i have few more questions on that...i have posted another thread regarding that
You set the clearCache flag to false, this means that when a transaction commits, it will not clear the cache so new searches will see the up to date changes the transaction performed. When you set the cacheInvalidation to -1, it means that no cache invalidation will happen, and when you set it to 0, it means that every search will check against the database to see if there is a new updated version of the index.
The comment put on the clearCache flag is a bit wrong. It won't slow down inserts, but will cause the first search that will happen again to refresh the cache.
I would suggest that you set the clearCache flag to true, since you want new search operations to see the results. And keep the index invalidation value to its default value (which is 5 seconds).
Also, I would suggest, if you can, move to Compass 2.1 (and Lucene 2.4). Refreshing of the cache is much faster in that version.
Migrated to compass 2.2.0 RC1 and followed your suggestion on enabling clearCache flag and cacheInvalidation. It is faster now. Does any of these two operations use the commonj work manager I configured...i sometimes see the below in the logs...curious what task is being executed by the commonj wm here...
The scheduled optimizer and async cache invalidation are using the work manager in your case. The other cases where the ExecutorManager is used (merging segments, concurrent transaction processors) are disabled because you store the index on the database.
Welcome to louis vuitton online! Here at our online shop, we enable you to select as many styles louis vuitton bags as you can at greatly discounted prices. Established in 2006, We have already landed so many returning customers from louis vuitton outlet. We have been known for the authentic quality of our items,such as louis vuitton belts and louis vuitton purses unsurpassed customer service, rapid delivery, unique prices and so on and so forth. What we did, are doing and will do is only to make our esteemed customers consume those world-renowned luxury designer merchandise with peace of mind. So we sincerely hope that you could be our next returning customer. We are confident that you will be quite satisfied with everything we offer here. Wish you a very good shopping louis vuitton store!
Report from our jingruihd correspondent (reporter Zhang Hong) the United States Yamaxun website general reachs electronic edition at the gucci outlets paper edition that autumn publishs 122 books this year, yamaxun a tall canal weighs headquarters, of publisher closing down finally is hasten of general trends place, can come sooner or later. Recently, li Kaifu of famous IT person sends small gain to say paper book Gucci Backpack can disappear. Li Yan of China press general manager, president of press of social science literature thanks Shou Guang, dolphin press president expresses Yu Xiaoqun, paper book won't disappear.
There is media coverage before this, yamaxun Gucci Clutches begins and direct autograph made an appointment with the author, and preparation opens the data of partial tiring-room to them. The website Gucci Evening will publish Yamaxun the paper edition of 122 books and electronic edition, hopeful replaces traditional publisher. Li Kaifu of famous IT person publishs small gain to say subsequently, paper book can disappear " long-term for this Gucci Hobos is inevitable " .
Li Yan of China press general manager expresses, "The thing may be done not have so simple, for the author that has become famous to great majority, likelihood more be used to counting a publishing house, presswork in Gucci Shoulder Bags order to make sure the publication of its work is mixed quality. On traditional sense, the editor is pleasant is done for them marry the garment, this kind of function won't disappear. Want to make an author complete accept an Gucci Top Handles electron to publish, the likelihood still needs course of a time. " in the light of " paper book sees meeting die out for a long time " view, li Yan says, "People accepts intellectual carrier to may have a change, but cannot say paper Gucci Totes book can disappear simply. We still can insist to become content provider, but, language power is apparently insufficient if we master now, by gucci outlets control of place of business of development of a few technologies, this is a very big question. This is a very big question..
Xiao Qun of Yu of dolphin gucci outlets store press president thinks, "This is far from likely " , he thinks, "This is the process of an industry move and annex, is not the process that an industry disappears. " Yu Xiaoqun thinks to publish deepen " itself is the antagonism with digitlization. Reading paper gucci bags outlet book is life of a kind of culture, culture life won't disappear. Culture life won't disappear..
President of press of social science literature thanked Shou Guang to also raise doubt, think, "Foreign it may not be a bad idea, chinese it may not be a bad idea, the editor is a louis vuitton outlet professional work, yamaxun enclothes all masses impossibly to publish, education is published and major is published. Yamaxun enclothes all louis vuitton bags masses impossibly to publish, education is published and major is published..