Skip to content

Program to get an overview of your query history in a solrwayback instance.

License

Notifications You must be signed in to change notification settings

WEB-CHILD/SolrWaybackQueryHistory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SolrWayback Query History Parser

DOI

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.

Why

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.

Requirements

  • Python 3.6+
  • No external Python packages required (uses the standard library)

Expected input format

  • 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.

Usage

Run the script with the path to your history text file:

python3 query-checker.py path/to/your-history.txt

For example, if you're using the included test file:

python3 query-checker.py test-history.txt

Output

For 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 first facets parameter, and the first fq parameter from the URL query string.
  • URL-decoding is performed using urllib.parse.unquote_plus, so + and percent-encodings will be converted to readable text.

Limitations and possible improvements

  • 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.

Citation

If you use this tool in your academic work, please cite it as follows:

BibTeX

@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}
}

Contributing

Small fixes or clarifications are welcome. For code changes, please create a branch and open a pull request with a short description.

About

Program to get an overview of your query history in a solrwayback instance.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages