[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Searching the Cache  XML
Forum Index -> Ehcache
Author Message
ddogra

neo

Joined: 10/11/2010 10:38:58
Messages: 7
Offline

Hi, I have recently started a project with Ehcache and need to build functionality to search the cache with a keyword that a user would enter through a UI. The intent is to display back to the user all cache elements which have text matching the user entered String.

Was wondering if there are any such search functions available in Ehcache classes.

I am new to the product so please bear with me if this is something trivial.

Thx
-Daman
gluck

qaestor

Joined: 09/15/2009 18:01:23
Messages: 179
Location: Brisbane, Australia
Offline

Daman

Good timing. We are building ehcache right now. You can see it being written in the search branch. https://svn.terracotta.org/repo/ehcache/branches/search/core

This is going beta in November.

It will have search added as a core API in ehcache-core. This will work in standalone ehcache. A powerful scatter-gather search will also be implemented for caches distributed with Terracotta server.

Greg
ddogra

neo

Joined: 10/11/2010 10:38:58
Messages: 7
Offline

Hi Greg, Thanks for replying. I think search functionality would be immensely helpful.
In the meanwhile though, is there a way to get ALL cache elements and loop through them ? I am operating in disk mode. One way (I guess) is to get a map of all keys, loop through the map and get elements one by one for each key. Are there any other better ways to get ALL elements.

Thanks

gluck

qaestor

Joined: 09/15/2009 18:01:23
Messages: 179
Location: Brisbane, Australia
Offline

Hi, the Ehcache Search is now out in alpha. You can give it a go. See http://ehcache.org/documentation/search.html
ddogra

neo

Joined: 10/11/2010 10:38:58
Messages: 7
Offline

Thanks Greg. I did give it a shot.

It seems that the current implementation of search only supports "in-memory" cache. My cache setup involves attributes 'overflowToDisk' and 'diskPersistent' both set to true. Are there plans for making the search work with disk persistent cache ?

-Daman
gluck

qaestor

Joined: 09/15/2009 18:01:23
Messages: 179
Location: Brisbane, Australia
Offline

Damian

Yes, but not in the first release. We will be adding support for high performance search for partitioned caches using Terracotta Server. With a single server this is open source.

An indexed standalone search, which would support BigMemory and DiskStore is on the cards for a follow up but it is unlikely it will be open source.
rajoshi

seraphim

Joined: 07/04/2011 04:36:10
Messages: 1491
Offline

Issue seems to be resolved.Please let us know if more information is required.

Rakesh Joshi
Senior Consultant
Terracotta.
 
Forum Index -> Ehcache
Go to:   
Powered by JForum 2.1.7 © JForum Team