Re: NotImplementedError: Postgres FTS not available

Martin Östlund via Roundup-users <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <[email protected]>
On 3/3/23 17:32, John P. Rouillard wrote:
> Hi Martin:
> 
> In message <[email protected]>,
> =?UTF-8?Q?Martin_=c3=96stlund?= via Roundup-users writes:
>> Following along, the Upgrade documentation for 2.2.0 to enable
>> native-fts for Postgres at
>> https://www.roundup-tracker.org/docs/upgrading.html#enhanced-full-text-search-optional
>>
>> Changing indexer to native-fts in config.ini (and running a supported
>> PostgreSQL), reindexing my database throws an exception:
> 
> I hope your upgrade to 2.2.0 wasn't to just use Postgres FTS. There
> are a few fixes needed for Postgres FTS to work. They are in the
> current development trunk. It turns out my test cases for 2.2.0's
> PostgreSQL FTS were not testing what I thought they were. In fixing
> that I found a few more issues.

No, it wasn't :) I'm just trying to keep our tracker somewhat updated. I 
would rather not put us in the situation we were in 2 years ago, running 
Roundup 1.4.20 and having to migrate to 2.x ;)


     - Enable postgres-fts: fix indexer-common::get_indexer so it returns a
>      postgresql-fts. Test code paths in get_indexer. (John Rouillard)
>    - Fix Postgres native-fts, implement a two phase initialization of the
>      indexer. The native-fts one gets assigned after the database
>      connection is open. (John Rouillard)
>    - fix crash if postgresql native-fts backend is asked to index content
>      with null bytes. (John Rouillard)
> 
> The one on top fixes:
> 
>> line 150, in get_indexer
>>      raise NotImplementedError("Postgres FTS not available")
>> NotImplementedError: Postgres FTS not available
>> [roundup@intlab roundup-2.2.0]$
>>
>> 149         if db.dbtype == "postgres":
>> 150             raise NotImplementedError("Postgres FTS not available")
>> 151             from roundup.backends.indexer_postgres_fts import Indexer
>> 152             return Indexer(db)
> 
>> Should it really raise an NotImplementedError here?
> 
> Umm, no it shouldn't have. It should have raised a BuggyImplementation
> exception 8-). That is more appropriate given the other bugs I found
> 8-/.  Sorry.
>   
> If you really need Postgresql FTS, you can run the development
> branch. There is no way to cherrypick the commits reliably. It would
> be good to get somebody to test it in a real use case. Sadly nobody
> tried it during the beta period. My "production" trackers run on
> sqlite with whoosh so...
> 
> After fixing the tests and things, I did spin up a tracker and tested
> it manually against a local (14.x) postgres. It seemed to work. I was
> able to get the proper issues returned (using web and tsquery type
> searches) and the native search __words table was empty. It didn't get
> a lot of testing with edge cases etc. trying to break it.
> 
> I also just realized that the Errata page
> (https://wiki.roundup-tracker.org/ReleaseErrata) isn't updated for
> this. I'll fix that.
> 
> Sorry I don't have better news. Have a great weekend.

No problem at all. Keep up the good work!

Regards,
-- 
Martin Östlund          Support
Cendio AB               https://cendio.com
Teknikringen 8          https://twitter.com/ThinLinc
583 30 Linköping        https://facebook.com/ThinLinc



_______________________________________________
Roundup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.