Hacker News new | ask | show | jobs
by jcrocholl 5986 days ago
Yes, I know the combined prefix and suffix search doesn't work properly yet. The reason is that the App Engine datastore doesn't support fancy search, only sorting with custom indexes. All results for a GQL query must be adjacent in the index. The indexes for combined prefix+suffix search are still building but should be ready in a few days.
1 comments

Until that happens, you could reduce it to a single field and show results for both types of searches. I found the prefix/suffix thing pretty confusing.
Actually, I have now enabled the search indexes for the following prefix+suffix combinations: 4+1, 3+2, 3+1, 2+1, 2+2, 1+1, 1+2, 1+3, 2+3, 1+4. I may add longer combinations later, but for now they will be shortened and filtered, e.g. 5+3 will use cached 4+1 and then filter the results in the browser with JavaScript.