You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by Emily Lynema <em...@ncsu.edu> on 2007/01/19 17:55:55 UTC
Search error
I have a roller 2.1 installation. Our search function used to work
appropriately, but is no longer returning any results for terms I know
exist. As far as I know, we haven't made any configuration or code
changes that would impact search functionality.
I took a look at our roller_data/search-index directory, and I only see
2 files: segments and .index-inconsistent. It looks like the actual
index is missing, as our development install with functioning search has
several files named like _a.cfs.
The logs indicate an error creating the writer to the index:
INFO 2007-01-19 11:32:29,824 WriteToIndexOperation:run - Starting
search index operation
ERROR 2007-01-19 11:32:29,830 IndexOperation:beginWriting - ERROR
creating writer
INFO 2007-01-19 11:32:29,831 WriteToIndexOperation:run - Search index
operation complete
I checked write permissions, and the search-index directory should be
writeable by the user running our roller web application.
I tried to trace the index operations back through the code, and I think
the error might is caused by these lines in IndexOperation.java:
try {
writer = new IndexWriter(manager.getIndexDirectory(),
IndexManagerImpl.getAnalyzer(), false);
} catch (IOException e) {
mLogger.error("ERROR creating writer");
}
But I'm just not familiar enough with the code to know what the problem
is. Any ideas?
Thanks.
-emily
--
Emily Lynema
Systems Librarian for Digital Projects
Information Technology, NCSU Libraries
919-513-8031
emily_lynema@ncsu.edu
Re: Search error
Posted by Dave <sn...@gmail.com>.
On 1/24/07, Emily Lynema <em...@ncsu.edu> wrote:
> After stopping Roller, deleting the contents of the search-index
> directory, and restarting Roller, the search is only partially working.
>
> Some searches return appropriate results, while others yield 0 results
> when valid results exist. Often, a search for a term returns 1 or 2
> recent results, but is missing other earlier results (using Google
> search for comparison).
>
> I tried to find a common denominator for results that *are* being
> returned, generally more recent entries are better indexed. But I have
> also seen cases where entries were returned that *didn't* contain the
> search term.
>
> There are no errors to indicate any problems in the roller logs.
Do you see something like this in the log?
INFO 2007-01-24 10:30:21,356 IndexManagerImpl:<init> - search enabled: true
INFO 2007-01-24 10:30:21,357 IndexManagerImpl:<init> - index dir:
/Users/dave/roller_data/search-index
INFO 2007-01-24 10:30:21,423 IndexManagerImpl:<init> - Index was
inconsistent. Rebuilding index in the background...
> Sounds like a corrupted index? But I'm suspicious of it happening right
> on the heels of being created in the first place. Do I have to stop
> Roller before deleting the contents of search-index/ in order to force
> Roller to create a new index?
As long as the search index is empty when Roller starts, it should do
a rebuild. The rebuild may take a little time, depending on how many
entries you have. You should see an INFO level message in the log when
the rebuild is complete "Completed rebuilding index for all users
in..."
I wonder if something is preventing the rebuild from completing.
- Dave
Re: Search error
Posted by Emily Lynema <em...@ncsu.edu>.
After stopping Roller, deleting the contents of the search-index
directory, and restarting Roller, the search is only partially working.
Some searches return appropriate results, while others yield 0 results
when valid results exist. Often, a search for a term returns 1 or 2
recent results, but is missing other earlier results (using Google
search for comparison).
I tried to find a common denominator for results that *are* being
returned, generally more recent entries are better indexed. But I have
also seen cases where entries were returned that *didn't* contain the
search term.
There are no errors to indicate any problems in the roller logs.
Sounds like a corrupted index? But I'm suspicious of it happening right
on the heels of being created in the first place. Do I have to stop
Roller before deleting the contents of search-index/ in order to force
Roller to create a new index?
Here's the contents of my search-index/ directory:
23764 Jan 23 22:58 _1f.cfs
10 Jan 23 23:02 _1f.del
7175 Jan 24 01:33 _1t.cfs
22067 Jan 23 14:43 _n.cfs
10 Jan 24 01:33 _n.del
4 Jan 24 01:33 deletable
43 Jan 24 01:33 segments
Any way to determine if there's something strange going on there? I
couldn't find any documentation about how the indexing and search work
in Roller 2.1 (or any version).
-emily
Dave wrote:
> On 1/19/07, Emily Lynema <em...@ncsu.edu> wrote:
>
>> I have a roller 2.1 installation. Our search function used to work
>> appropriately, but is no longer returning any results for terms I know
>> exist. As far as I know, we haven't made any configuration or code
>> changes that would impact search functionality.
>>
>> I took a look at our roller_data/search-index directory, and I only see
>> 2 files: segments and .index-inconsistent. It looks like the actual
>> index is missing, as our development install with functioning search has
>> several files named like _a.cfs.
>>
>> The logs indicate an error creating the writer to the index:
>>
>> INFO 2007-01-19 11:32:29,824 WriteToIndexOperation:run - Starting
>> search index operation
>> ERROR 2007-01-19 11:32:29,830 IndexOperation:beginWriting - ERROR
>> creating writer
>> INFO 2007-01-19 11:32:29,831 WriteToIndexOperation:run - Search index
>> operation complete
>>
>> I checked write permissions, and the seasrch-index directory should be
>> writeable by the user running our roller web application.
>>
>> I tried to trace the index operations back through the code, and I think
>> the error might is caused by these lines in IndexOperation.java:
>>
>> try {
>> writer = new IndexWriter(manager.getIndexDirectory(),
>> IndexManagerImpl.getAnalyzer(), false);
>> } catch (IOException e) {
>> mLogger.error("ERROR creating writer");
>> }
>
>
>> But I'm just not familiar enough with the code to know what the problem
>> is. Any ideas?
>
>
> Sounds like you have a corrupted search index and Roller is failing to
> create a new index due to... something, it's hard to tell what. I wish
> that logger line was:
>
>> mLogger.error("ERROR creating writer", e );
>
>
> I'm not sure what the bug is, but you should be able to work around it
> by stopping Roller, deleting the contents of your search index
> directory and then restarting, Roller will then rebuild your search
> index and search should start working again.
>
> - Dave
--
Emily Lynema
Systems Librarian for Digital Projects
Information Technology, NCSU Libraries
919-513-8031
emily_lynema@ncsu.edu
Re: Search error
Posted by Dave <sn...@gmail.com>.
On 1/19/07, Emily Lynema <em...@ncsu.edu> wrote:
> I have a roller 2.1 installation. Our search function used to work
> appropriately, but is no longer returning any results for terms I know
> exist. As far as I know, we haven't made any configuration or code
> changes that would impact search functionality.
>
> I took a look at our roller_data/search-index directory, and I only see
> 2 files: segments and .index-inconsistent. It looks like the actual
> index is missing, as our development install with functioning search has
> several files named like _a.cfs.
>
> The logs indicate an error creating the writer to the index:
>
> INFO 2007-01-19 11:32:29,824 WriteToIndexOperation:run - Starting
> search index operation
> ERROR 2007-01-19 11:32:29,830 IndexOperation:beginWriting - ERROR
> creating writer
> INFO 2007-01-19 11:32:29,831 WriteToIndexOperation:run - Search index
> operation complete
>
> I checked write permissions, and the search-index directory should be
> writeable by the user running our roller web application.
>
> I tried to trace the index operations back through the code, and I think
> the error might is caused by these lines in IndexOperation.java:
>
> try {
> writer = new IndexWriter(manager.getIndexDirectory(),
> IndexManagerImpl.getAnalyzer(), false);
> } catch (IOException e) {
> mLogger.error("ERROR creating writer");
> }
> But I'm just not familiar enough with the code to know what the problem
> is. Any ideas?
Sounds like you have a corrupted search index and Roller is failing to
create a new index due to... something, it's hard to tell what. I wish
that logger line was:
> mLogger.error("ERROR creating writer", e );
I'm not sure what the bug is, but you should be able to work around it
by stopping Roller, deleting the contents of your search index
directory and then restarting, Roller will then rebuild your search
index and search should start working again.
- Dave