Ticket #4257 (closed defect: worksforme)
Opened 5 years ago
Last modified 5 years ago
Trac works but searching doesn't
| Reported by: | dbw | Owned by: | jonas |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | search system | Version: | 0.9.6 |
| Severity: | normal | Keywords: | |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
Description
I have been using Trac 0.9.6 for awhile. Was going to upgrade to .10, but had subversion issues, so had to put that on hold for the moment.
The wiki and the tickets work fine. But my problem is that the Search (box or advanced) doesn't find any of my documents. It will find words in the standard wiki-default docs, but not in any page that I've ever created. Seems like the index (I'm asuming there is one) is never getting updated.
The log file is empty (I have it set to log to a file), so I have no real idea what's going on. How does the index get built?
Attachments
Change History
comment:1 Changed 5 years ago by jonas
comment:2 Changed 5 years ago by mgood
- Keywords needinfo added
comment:3 follow-up: ↓ 4 Changed 5 years ago by anonymous
I am using Postgres (7.4.7)
database = postgres://<db_user>:<db_pass>@localhost/svn_dbw
Have a look at the problem:
a wiki page with the word "Bizarre": http://www.dmstr.com/temp/trac/Screenshot-1-WikiPage.jpg
a search for the word Bizarre:
http://www.dmstr.com/temp/trac/Screenshot-2-SearchFailed.jpg
By the way, I tried to upload these JPEG screenshots to this ticket, and I got errors from the Edgwewall TRAC. I'm not logged in, but this error probably shouldn't come up anyway...
Oops…
Trac detected an internal error:
If you think this really should work and you can reproduce it, you should consider reporting this problem to the Trac team.
Go to http://trac.edgewall.org/ and create a new ticket where you describe the problem, how to reproduce it. Don't forget to include the Python traceback found below.
TracGuide — The Trac User and Administration Guide
Python Traceback
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 387, in dispatch_request
dispatcher.dispatch(req)
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 238, in dispatch
resp = chosen_handler.process_request(req)
File "/usr/lib/python2.4/site-packages/trac/attachment.py", line 361, in process_request
self._do_save(req, attachment)
File "/usr/lib/python2.4/site-packages/trac/attachment.py", line 474, in _do_save
for field, message in manipulator.validate_attachment(req, attachment):
File "build/bdist.linux-x86_64/egg/tracspamfilter/adapters.py", line 130, in validate_attachment
File "build/bdist.linux-x86_64/egg/tracspamfilter/api.py", line 131, in test
File "build/bdist.linux-x86_64/egg/tracspamfilter/model.py", line 119, in insert
File "/usr/lib/python2.4/site-packages/trac/db/util.py", line 50, in execute
return self.cursor.execute(sql_escape_percent(sql), args)
File "/usr/lib/python2.4/site-packages/trac/db/util.py", line 50, in execute
return self.cursor.execute(sql_escape_percent(sql), args)
ProgrammingError: current transaction is aborted, commands ignored until end of transaction block
comment:4 in reply to: ↑ 3 Changed 5 years ago by cboos
Replying to anonymous:
I am using Postgres (7.4.7)
Which Python binding?
a wiki page with the word "Bizarre": http://www.dmstr.com/temp/trac/Screenshot-1-WikiPage.jpg
a search for the word Bizarre:
http://www.dmstr.com/temp/trac/Screenshot-2-SearchFailed.jpg
Bizarre, bizarre, indeed ;)
Probably an encoding issue. What encoding is the database using?
By the way, I tried to upload these JPEG screenshots to this ticket, ...
Known issue, see #4087.
comment:5 Changed 5 years ago by anonymous
OK, now I'm out of my depth. I was doing okay for awhile. :-)
Can you tell me how to get the Python binding and DB encoding I'm using?
I'm a MYSQL guy, don't know Postgresql in the least. I inherited this system (love it), but don't know the ins and outs. Any easy way I can convert it from Postgres to MySql??
comment:6 Changed 5 years ago by anonymous
This probably answers your binding question, but not your encoding question.
Apache/2.0.58 (Unix) mod_ssl/2.0.58 OpenSSL/0.9.7e DAV/2 SVN/1.1.4 mod_python/3.1.3 Python/2.3.5
comment:7 Changed 5 years ago by anonymous
Psql encoding is LATIN-1
comment:8 Changed 5 years ago by anonymous
trac.ini had default_charset set to iso-8859-15. According to the docs, this setting is for "text files in the svn repository" -- not sure that it is what we're looking for or not.
So, figuring that there is an encoding mismatch, I first tried setting TRAC to LATIN1 to match Postgres, but that would have been too easy. Still no luck.
So, I
- dumped the db.
- GNU Recode(d) the dump file to UTF-8.
- Created a new Unicode db.
- Restored the UTF-8 dump file into the Unicode db.
- Changed my trac.ini to "UTF=8" and also tried "Unicode"
Still no luck''' I'm out of ideas. You?
Thank you, Jonas. I know you're busy, and I appreciate your help immensely.
comment:9 Changed 5 years ago by anonymous
Any more thoughts, Jonas?
comment:10 Changed 5 years ago by anonymous
- Keywords needinfo removed
- Resolution set to fixed
- Status changed from new to closed
Upgraded to 0.10.3dev and issue is no longer present. Thanks Jonas.
comment:11 Changed 5 years ago by cboos
- Resolution fixed deleted
- Status changed from closed to reopened
comment:12 Changed 5 years ago by cboos
- Resolution set to worksforme
- Status changed from reopened to closed
(fixing the resolution)



This sounds strange since the wiki is searched directly with a sql-"like" query, there is no index that can become outdated.
Which db backend are you using (sqlite, postgresql or mysql)?