Commit Graph

8461 Commits

Author SHA1 Message Date
Michael Peter Christen
30d71c6359 added usage of X-Real-IP http header
to identify request IPs which came through NGINX reverse proxy
configurations
2017-08-15 07:16:01 +02:00
Michael Peter Christen
f45378c11c Merge branch 'master' of https://github.com/yacy/yacy_search_server.git 2017-08-14 20:12:26 +02:00
Michael Peter Christen
7f395ef937 added image link in search results
This should be a help to make a preview of search results.
The image is computed from the list of embedded images, it is
always the first image in that list.
In rss-type results the image is presented like
<media:content medium="image" url="https://abc.xyz/logo.png"/>
as defined in
http://www.rssboard.org/media-rss#media-content
2017-08-14 20:12:09 +02:00
luccioman
780173008e Implemented partial stream parsing of tar archives.
Also added JUnit tests for the tar parser and fixed unwanted use of the
tar parser as a fallback on files included in a tar archive.
2017-08-14 14:57:58 +02:00
luccioman
acab6a6def Also handle text content when parsing XML within limits. 2017-08-14 14:47:01 +02:00
reger
2a07799ad1 Correction of d03e2c98ea
Fix Conjunction.addOperator to do nothing if term is empty
prevent to result in query string with repeated logical operator
like "field:term AND AND field:term"
possibliy causing out of mem in postprocessing_doublecontent
2017-08-14 01:03:15 +02:00
reger
d03e2c98ea Fix Conjunction.addOperator to do nothing if term is empty
prevent to result in query string with repeated logical operator
like "field:term AND AND field:term"
possibliy causing out of mem in postprocessing_doublecontent
2017-08-14 00:52:03 +02:00
reger
b6a41df4f7 Remove deprecated YaCyProxyServlet
was replaced by UrlProxyServlet
2017-08-12 21:53:04 +02:00
luccioman
8a94fef9e0 Prevent unwanted cached bytes duplication on stream parsing. 2017-08-12 09:43:49 +02:00
reger
4979439e87 Skip public post of jre version.
Added to determine switch to java8  596b5dfa59
2017-08-06 23:41:53 +02:00
reger
e918ec199e Replace deprecated ConcurrentHashSet with recommended Java8
ConcurrentHashMap.newKeySet() in postprocessDocuments()
2017-08-06 23:26:27 +02:00
reger
fb71994342 Harmonizing use of xml reader / sax parser in XMLBlacklistImporter
eliminating the need for lib/xercesImpl.jar
2017-08-05 23:47:27 +02:00
reger
275d65fffe Patch last_modified date with internal FirstSeenTime() if no date provided
to make sure updated documents are indexed with their last-modified
date as provided in current crawl. 
(to patch moddate always with firstseen might bear the risk of miss 
actual updates).
2017-08-05 22:30:06 +02:00
reger
d1b23afed6 Remove obsolete Protocol parameter ttl (time to live)
not interpreted in target yacy/query.html
also Protocol.querySeed() not used and parameter not interpreted in 
target servlet yacy/query.html
2017-08-01 00:59:53 +02:00
reger
15d78b1064 Replace deprecated getIP with getIPs in Protocol transferURL() and
getProfile().
Remember used ip for error handling and departInterface
2017-07-31 01:55:01 +02:00
reger
ed36b47bec Replace one more deprecated peerDeparture in Protocol.transferIndex()
by moving/using interfaceDeparture() in transferRWI()
2017-07-30 23:02:15 +02:00
luccioman
0ee8c030c4 Log an error when Solr folder migration fails for some reason. 2017-07-17 15:35:10 +02:00
luccioman
5a646540cc Support parsing gzip files from servers with redundant headers.
Some web servers provide both 'Content-Encoding : "gzip"' and
'Content-Type : "application/x-gzip"' HTTP headers on their ".gz" files.
This was annoying to fail on such resources which are not so uncommon,
while non conforming (see RFC 7231 section 3.1.2.2 for
"Content-Encoding" header specification
https://tools.ietf.org/html/rfc7231#section-3.1.2.2)
2017-07-16 14:46:46 +02:00
luccioman
11a7f923d4 Distinguish response parsing failures from unexpected exceptions. 2017-07-16 14:39:53 +02:00
luccioman
eda7b0aeb6 Merge branch 'master' of https://github.com/yacy/yacy_search_server 2017-07-15 08:49:25 +02:00
reger
3005be7349 Clean up unmaintained and unused AugmentParser trail. 2017-07-15 00:19:23 +02:00
luccioman
cb4f1358e1 Added gzip parser support for max content bytes limit 2017-07-13 08:18:40 +02:00
luccioman
5216c681a9 Added HTML parser support for maximum content bytes parsing limit 2017-07-13 08:12:10 +02:00
luccioman
4aafebc014 Merge pull request #122 from Scarfmonster/patch-1
I also reproduced the issue, and the fix is working fine.

Thanks @Scarfmonster
2017-07-12 16:03:23 +02:00
luccioman
651fad6da5 Added RSS parser support for maximum content bytes parsing limit 2017-07-12 00:18:12 +02:00
luccioman
452a17a8d5 Finer control on bounded input streams with custom stream implementation 2017-07-12 00:13:24 +02:00
luccioman
f8f1959ebb Added parsing within bounds implementation to the generic parser. 2017-07-11 09:07:48 +02:00
luccioman
e0f400a0bd Support trying multiple parsers even when streaming on large resources. 2017-07-11 09:06:37 +02:00
luccioman
1e84956721 Support loading local files with a per request specified maximum size.
Consistently with the HTTP loader implementation.
2017-07-11 09:04:23 +02:00
luccioman
f369679d1c Fixed read/copy on input streams reading sometimes less than expected. 2017-07-11 09:00:27 +02:00
luccioman
bf55f1d6e5 Started support of partial parsing on large streamed resources.
Thus enable getpageinfo_p API to return something in a reasonable amount
of time on resources over MegaBytes size range.
Support added first with the generic XML parser, for other formats
regular crawler limits apply as usual.
2017-07-08 09:04:03 +02:00
luccioman
90a7c1affa HTML parser : removed unnecessary remaining recursive processing
Recursive processing was removed in commit
67beef657f, but one remained for anchors
content(likely omitted from refactoring). It is no more necessary :
other links such as images embedded in anchors are currently correctly
detected by the parser.

More annoying : that remaining recursive processing could lead to almost
endless processing when encountering some (invalid) HTML structures
involving nested anchors, as detected and reported by lucipher on YaCy
forum ( http://forum.yacy-websuche.de/viewtopic.php?f=23&t=6005 ).
2017-07-03 10:00:53 +02:00
reger
e6e20dab52 upd to Jetty 9.4.6.v20170531
Modify loginservice to the changes in Jetty, partially based on pull 
request #101 https://github.com/yacy/yacy_search_server/pull/101 bu @automenta
2017-07-01 23:58:28 +02:00
luccioman
dcc56318bb Made remote search max system load limits configurable from UI.
As reported by davide on YaCy forums (
http://forum.yacy-websuche.de/viewtopic.php?f=23&t=6004 ) when the
system is on high load, unless reading carefully YaCy configuration
file, it could be difficult to understand why remote search results are
not fetched.
2017-06-30 11:30:54 +02:00
reger
ddd13b776d Add keyword constraint to rwi query result filter
To discard rwi results not matching query keyword: parameter
2017-06-30 02:11:18 +02:00
luccioman
e82eaee4b6 Apply consistent behavior on HTTP resource size exceeding limit.
On content size known from HTTP headers, terminates connection faster
and improves error reports quality by reporting relevant message
"Content to download exceed maximum value..." rather than previously "no
response (NULL) for url...".
2017-06-30 01:13:47 +02:00
luccioman
0b75e92ac2 Do not wrap unnecessarily loader IOExceptions in IOExceptions 2017-06-30 01:06:17 +02:00
luccioman
433bdb7c0d Respect maxFileSize limit also when streaming HTTP and when relevant.
Constraint applied consistently with HTTP content full load in byte
array.
2017-06-30 00:30:54 +02:00
luccioman
9b1bb2545e Refactored plain-text URLs detection implementation.
For faster processing (measured about 2 times faster on many real-world
examples) and more advanced detection (previous algorithm detected only
URLs separated from the rest of the text by a space character).
2017-06-27 19:30:40 +02:00
luccioman
8da3174867 Ensure lower case conversion consistency with any default locale.
Especially for Turkish speaking users using "tr" as their system default
locale : strings for technical stuff (URLs, tag names, constants...)
must not be lower cased with the default locale, as 'I' doesn't becomes
'i' like in other locales such as "en", but becomes 'ı'.
2017-06-27 06:42:33 +02:00
luccioman
286f3018bd Made mime type and extension normalization locale independent.
Previously, upper cased mime type was incorrectly normalized when the
default locale is Turkish.
2017-06-26 17:33:56 +02:00
luccioman
319231a458 Added a generic XML parser, able to parse elements text and URLs.
This parser adds support for any XML based format other than already
supported XML vocabularies such XHTML, RSS/Atom feeds... It will
eventually be used as a fallback if one of these specific parsers fail,
before falling back to the existing genericParser which extracts not
that much useful information except URL tokens.
2017-06-26 16:30:21 +02:00
Ryszard Goń
3cedbbd4ed Wrong password was removed after the SSL certificate import
Removing the keystore password will prevent ssl from working after the next restart. The certificate password should be removed instead.
Fixes http://mantis.tokeek.de/view.php?id=687
2017-06-23 02:23:49 +02:00
luccioman
64cec2790d Improved character encoding detection from Content-Type header
Also updated some related JavaDocs
2017-06-22 10:50:34 +02:00
luccioman
0487336ec3 Prevent integer overflow in table statistics and use strong typing 2017-06-19 17:02:11 +02:00
luccioman
d2a4a27f52 Improved stream-oriented parsing entering conditions. 2017-06-17 09:26:37 +02:00
luccioman
9dd790087d Added HT Cache basic statistics (hit rate) 2017-06-15 09:50:02 +02:00
luccioman
5fdd5d16b1 Use volatile to ensure concurrent threads use up to date property value 2017-06-15 09:48:22 +02:00
luccioman
28b451a0b3 Made Cache compression level and lock timeout user configurable 2017-06-14 19:02:08 +02:00
luccioman
a7394b479b Limit the synchronization blocking time on some Cache operations.
Using a Reentrant lock instead of the intrinsic synchronization lock
permits limiting the blocking time to acquire a lock.

Useful on a very busy Cache concurrently accessed by many threads : when
the time to acquire a lock is too high, getting/storing content on the
cache becomes inefficient, and it is then better to fall back to loading
remote resources.

Illustrated by the CacheTest stress test and some traces reported in
mantis 751 ( http://mantis.tokeek.de/view.php?id=751 )
2017-06-14 09:13:50 +02:00