A small utility to extract SolrWayback search queries (and optional facets / filter queries) from a browser history text file.
This repository contains a single script, query-checker.py, which reads a history file with one URL per line (in inverted chronological order) and prints parsed SolrWayback search queries in chronological order.
If you use SolrWayback and want to analyze or revisit past searches recorded by your browser, this script parses the search URL parameters and prints the query, facets, and filter queries in a readable format.
- Python 3.6+
- No external Python packages required (uses the standard library)
- A plain text file with one URL per line. The file should be in inverted chronological order (newest entry first), which is the typical order exported by many browser history tools.
Example (lines are URLs):
https://localhost:8080/solrwayback/search?query=example+term&facets=...&fq=...
https://localhost:8080/solrwayback/search?query=another+search
The script only processes lines that contain localhost:8080/solrwayback/search?query= and will decode URL-encoded strings before parsing.
Run the script with the path to your history text file:
python3 query-checker.py path/to/your-history.txtFor example, if you're using the included test file:
python3 query-checker.py test-history.txtFor each SolrWayback search URL found in the history file, the script prints an iteration number and the parsed parameters. Example output:
Iteration: 1
Query: example term
Facets: facetParam
Filter Query: field:value
-----------------------
Notes:
- The script extracts the first
query, the firstfacetsparameter, and the firstfqparameter from the URL query string. - URL-decoding is performed using
urllib.parse.unquote_plus, so+and percent-encodings will be converted to readable text.
- The script currently looks for
localhost:8080/solrwayback/search?query=. If your SolrWayback instance runs on a different host or port, update the script or use a preprocessed history file.
If you use this tool in your academic work, please cite it as follows:
@software{solrwayback_query_history_parser,
author = {{Johnston, Victor Harbo}},
title = {SolrWayback Query History Parser},
year = {2025},
publisher = {Zenodo},
version = {v0.0.1},
doi = {10.5281/zenodo.17539853},
url = {https://github.com/WEB-CHILD/SolrWaybackQueryHistory},
note = {A utility for extracting SolrWayback search queries from browser history files}
}Small fixes or clarifications are welcome. For code changes, please create a branch and open a pull request with a short description.