Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faster search #1163

Open
UserEu opened this issue Jul 6, 2024 · 0 comments
Open

Faster search #1163

UserEu opened this issue Jul 6, 2024 · 0 comments

Comments

@UserEu
Copy link

UserEu commented Jul 6, 2024

The search is very slow ( more than a second sometimes ) on the Xiphos app.

I wrote a java app that can search much faster through the Bible text.

The pseudoalgorithm has 5 steps.

Steps 1-4 quickly preselect a small set of verses that may contain the search query.
Step 5 selects the correct verses.

The search pseudoalgorithm is as follows.

1.Every verse has a number.

2.For every word in the Bible I create lists that contain the verse numbers where the word appears.

3.I create an empty list L then append to it the lists of the words in the search query.
This allows me to know the numbers of all the verses that contain the words in the query.

4.Then I count the number of occurences for every verse number in the list L.
This selects the verses with higher occurences and this gives me a small set S of verses that may contain the query.

5.I search each verse in S according to a desired criteria to see wether it contains the search query.

I implemented it in Java and the search time is 1-8 ms on my system.

It is MUCH FASTER than the Xiphos search.

Although the app has some bugs I can send you the sources and the jar file .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant