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

Configurable database names #420

Closed
wants to merge 21 commits into from

Conversation

dgoiko
Copy link

@dgoiko dgoiko commented Nov 16, 2019

It is possible to configure the database names from the CrawlControler constructor.

It allowed me to create multiple CrawlerControllers on the same working directory without having the URLs mixed between them.

Added POST to WebURL and PageFetcher. Included support for the new WebURL attributes in WebURLTupleBinding.

I've suggested to deprecate newHttpUriRequest(String) in PageFetcher because it does not allow to pass post parameters.
DocIDServer is now aware of POST data and allows to visit the same URL if POST parameters are different. (Filling a form with different years, for instance).

Suggested to deprecate getDocId, getNewDocID, addUrlAndDocId and isSeenBefore since they don't allow to pass post parameters.

WebURL has the ability to encode itself into a single unique string.

NOTE: This serialization SHOULD be improved.
The WebCrawler now passes the WebURL to the DocIDServer instead of passing a String URL.

We assume GET on redirections. I'm not 100% sure if this is allways true.

The case !curURL.getURL().equals(fetchResult.getFetchedUrl()) is still using old methods. Should be reviewed
Added addSeenUrl(WebURL) and addSeed(WebURL)  methods to CrawlController. Did not touch original methods, although I'd suggest to make them create WebURLs and pass them to the new methods.
addSeed and addSeenUrl now will create a WebURL and pass it to the newly created methods. It will make it easier for the user to override those methods.
Suggedted to deprecate old fetchedUrl attribute and introduced fetchedWebUrl, which is a WebURL.

Some tab style fixes.
There was a loop.

Some style fixes.
It is possible to configure the database names from the CrawlControler constructor.
Extracted interfaces from Parser and PageFetcher in order to make it easier to create totally custom classes
@yasserg
Copy link
Owner

yasserg commented Nov 19, 2019

why would we need to put them in the same working directory?

Now WebURLs can be used as seeds, so we enforce docId to be < 0 unless staten otherwise
@dgoiko
Copy link
Author

dgoiko commented Jan 9, 2020

Closed. I accidentaly merged other things into this branch. Opened #426 instead

@dgoiko dgoiko closed this Jan 9, 2020
@dgoiko dgoiko deleted the Configurable-DB-names branch January 9, 2020 19:52
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

Successfully merging this pull request may close these issues.

2 participants