Opened 13 years ago

Closed 13 years ago

#19 closed enhancement (fixed)

Automatically relazify the database if any of the "keyword" search preferences are changed

Reported by: stuarth Owned by: stuarth
Priority: major Milestone: 2.3
Component: Plugin Version: 2.2
Keywords: Cc:

Description

As the data stored in the lazified customsearch columns can depend on the settings on the plugin preference page for keyword searches, if any of those settings changes then the database should be re-lazified.

Re-lazification should overwrite the current contents of the customsearch columns, and should do all entries - not just those that haven't yet been lazified.

Bonus points for only re-lazifying the database tables that are affected by the appropriate keyword preferences.

Change History (8)

comment:1 Changed 13 years ago by stuarth

  • Status changed from new to assigned
  • Version set to 2.2

comment:2 Changed 13 years ago by stuarth

I think we might be able to get a callback through the "pref" notification.

comment:3 Changed 13 years ago by stuarth

  • Milestone changed from Implement a 'keyword' search mode for the plugin to Enhancements to the Keyword Searching

comment:4 Changed 13 years ago by stuarth

  • Milestone 2.2.2 deleted

comment:5 Changed 13 years ago by stuarth

  • Milestone set to 2.2.3

I think I can do this with an OnChange hook on each of the appropriate preferences.

They should schedule a delayed scan since if all three are changed then three OnChanges will be called. Each schedule should cancel a pending rescan if one is already scheduled.

The delayed scan should be a "forced" scan to remove and replace lazification.

Extra marks for only re-lazifying the parts of the database that are affected by these settings - in this case the Tracks table.

Finally, note that the introductory text for those preferences should have the clear-and-rescan text removed.

comment:6 Changed 13 years ago by stuarth

The delay can be set to LAZYSEARCH_INITIAL_LAZIFY_DELAY, and the 'changed' text should indicate that the lazy search indexes will be "updated shortly".

comment:7 Changed 13 years ago by anonymous

Does this anonymous comment work?

comment:8 Changed 13 years ago by stuarth

  • Resolution set to fixed
  • Status changed from assigned to closed

This has been implemented in r226.

Note: See TracTickets for help on using tickets.