You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At present, Solr is never cleared out. Each new edition just adds more data to it. This might result in having multiple copies of each law show up in search results, or it might overwrite existing records (I'm not sure which). Overwriting existing records might sound OK, but if § 1-2.34-56 is removed from a new edition of the code, it will stay in the index, resulting in people being shown no-longer-extant laws as if they're still on the books.
Realistically, there are three steps to this:
Clear out Solr at the same time as clearing out everything else in the database.
Establish a field and facet for editions within Solr (which I don't think exists now).
Clear out just the edition in question from Solr, rather than everything, when updating an edition.
I'm OK with only doing the first step for v1.0, and saving 2 and 3 for v1.1.
Create an option on search for "search all editions", which defaults to "off". I assume we want to make search only search the edition marked as "current" by default
Add a delete index function to ParserController using the code above. Delete indexes matching a given edition on update/insert.
If we end up using standard updates in solr, the primary key should now be the url, which takes into account editions and should be ok for us to use.
This is getting pretty close. I still need to get the frontend search form working with the backend changes I've made here - particularly in handling the edition id that's passed now, but otherwise editions are pretty much working with Solr. The schema has changed a lot though, everything will need to be reindexed.
Activity
waldoj commentedon Nov 8, 2013
@krues8dr provides this code, to this end:
krusynth commentedon Nov 12, 2013
Here's what needs to happen, precisely:
If we end up using standard updates in solr, the primary key should now be the url, which takes into account editions and should be ok for us to use.
waldoj commentedon Nov 13, 2013
Yup, this all makes sense to me.
Creating generic solr handler; Clearing solr when we empty the database.
Adding return true to solr handler. #500
krusynth commentedon Nov 15, 2013
All that mess there does is abstract out the solr curl mess into a single handler, and clear out the solr index when clearing out the database.
waldoj commentedon Nov 15, 2013
Oh, great—those are sensible improvements. Thanks.
krusynth commentedon Feb 11, 2014
@waldoj I'm finally digging in on this. Note that a Solr schema change will be coming down the pipe soon, meaning you'll have to muck about with Solr.
krusynth commentedon Feb 11, 2014
This... this may warrant a change to the SD XML format as well. 🍆
waldoj commentedon Feb 11, 2014
😢
krusynth commentedon Feb 11, 2014
It just seems like it'd make sense to have a separate edition parameter, rather than extracting it from the unique identifier? 🎷
Adding edition support to Solr. #500
Use the edition slug, not the id. #500
Search using editions. #500
21 remaining items
Refactoring to abstract away Solarium-specific code out of search res…
krusynth commentedon Apr 13, 2015
There's a regression in this somewhere that broke highlighting, section numbers, and the structure hierarchy in results.
Fix spellcheck on search. #500
Fixing highlighting in search. #500
Fixing section number on search indexing. #500
Fixing structures in search. Touches #500 Resolves #440 #441
Adding example search using SQL only. Cleaning up search.
Adding example SqlSearchEngine to config. #500 #552
krusynth commentedon Apr 19, 2015
This is getting pretty close. I still need to get the frontend search form working with the backend changes I've made here - particularly in handling the edition id that's passed now, but otherwise editions are pretty much working with Solr. The schema has changed a lot though, everything will need to be reindexed.
Cleaning up search, using proper statement preparation for REGEXP terms.
Continuing search work on editions #362 #500
Continuing search work on editions #362 #500
Allow users to go to a different edition of the current page. #362 #500
krusynth commentedon Apr 25, 2015
This is now complete on the
edition-updatebranch.