The Artima Developer Community
Sponsored Link

Java Answers Forum
Design for performance

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
simple sol

Posts: 3
Nickname: denjai
Registered: Nov, 2010

Design for performance Posted: Nov 17, 2010 4:18 AM
Reply to this message Reply
Advertisement
I am using Springs+Hibernate in my application. I have a auto suggest which can search on field where the starting letters match

If values in database are

1 Green curry
2 curry chilly
3 Red Green Chilly Curry

If I type

curr it should give me all the above values as suggestion
If I type Gree it should give me 1 and 3.
If I type urry (missing c) it should not give any results

In short I want to search starts with on any word.
The data is stored in single field in database and can have huge number of records (30 to 40k for autosuggest).

What design should we go with to satisfy the requirement considering we do not want to change the data base scheme to split the storage based on space.

1. Keeping some in memory data structure?
2. Using index search like lucene? Might be too much work to introuce indexing for this simple requirement?
3. Any other way to perform such queries in hibernate?
4. Any other ideas?

So the search tokens should be generated

Topic: Need help with writing a code for following problem Previous Topic   Next Topic Topic: java password

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use