Hello Everybody,

I am trying to build an efficient search like I saw in one of the
google IO videos. So the goal is to use the hierarchy of the datastore
to make the search more effecient. The datastore would look something
like this:


Database words

Database words.articlesmap
Database articles


Each article is broken down into a set of words and the article map
just holds the key to the article. The basic path


Find the article i want and get its key.
Use the key to search for all words.articlemap
Get the parent of each articleamp.


At this point I am completely lost. Heres what I have so far but I have
no idea if I am on the right path and second how do I actually do the
search


Word.java
[code]

@PersistenceCapable
public class Word {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key mKey;

@Persistent
String mWord;

@Persistent

List<ArticleMap> mArticleList;

public Word(String word)
{
mWord = word;
}


public Key GetKey() {
return mKey;
}


public void SetKey(Key key) {
mKey = key;
}

public String GetWord()
{
return mWord;
}


public void AddArticleMap( ArticleMap article )

{
if ( !mArticleList.contains(article) ) {
mArticleList.add(article);
}
}


public void RemoveArticleMap( ArticleMap article )
{
if ( !mArticleList.contains(article) ) {
mArticleList.remove(article);
}
}
}



[/code]


ArticleMap.java
[code]

@PersistenceCapable
public class ArticleMap {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key mKey;


@Persistent
private Key mArticleKey;

public Key GetKey() {
return mKey;
}


public void SetKey(Key key) {
mKey = key;
}

public Key GetArticleKey() {
return mArticleKey;
}


public void SetArticleKey(Key key) {
mArticleKey = key;
}
}
[/code]


Article.java
[code]

@PersistenceCapable
public class Article {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key mKey;

@Persistent
private Text mText;

public Article( Text text ) {
SetText(text);
}

public Key GetKey() {
return mKey;
}


public void SetKey(Key key) {
mKey = key;
}


public void SetText(Text text) {
mText = text;
}


public Text GetText() {
return mText;
}
}
[/code]


How do I tie the article map to the word itself, how do I tie the
article to the article map. How do I search for based on article map
and map that to article.


Thank you for your time
Ben

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to