ramakavuri / guestbook-example-appengine-full-text-search

Automatically exported from code.google.com/p/guestbook-example-appengine-full-text-search
0 stars 0 forks source link

Search returns a "500 Server Error" page #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Go to page http://guestbook-example-fts.appspot.com/
2. Enter "This" in the first text input box, click "Search"

What is the expected output? What do you see instead?

A 500 Server Error is returned.

This is the page text:

  Error: Server Error
  The server encountered an error and could not complete your request.

  If the problem persists, please report your problem and mention this
error message and the query that caused it.

This error probably has something to do with searching for only a stopWord.

Original issue reported on code.google.com by watson.r...@gmail.com on 5 May 2010 at 10:33

GoogleCodeExporter commented 9 years ago
Can confirm this. Also with the word "is"

 - Johannes M.

Original comment by Johannes...@gmail.com on 31 May 2011 at 7:49

GoogleCodeExporter commented 9 years ago
I solved this problem by adding this code into SearchJanitor.java:

    if(parameterCounter == 0) {
        queryBuffer.append("id != 1");
    }

before this

    Query query = pm.newQuery(queryBuffer.toString());

- Armen

Original comment by adaniel...@fhi360.org on 1 Dec 2011 at 5:01