mirror of https://github.com/zlatinb/muwire
propagate regex flag in queries in preparation for regex search
parent
548a981b16
commit
bd3555dce9
|
@ -157,6 +157,7 @@ abstract class Connection implements Closeable {
|
|||
query.compressedResults = e.searchEvent.compressedResults
|
||||
query.collections = e.searchEvent.collections
|
||||
query.searchPaths = e.searchEvent.searchPaths
|
||||
query.regex = e.searchEvent.regex
|
||||
if (e.searchEvent.searchHash != null)
|
||||
query.infohash = Base64.encode(e.searchEvent.searchHash)
|
||||
query.replyTo = e.replyTo.toBase64()
|
||||
|
@ -286,6 +287,9 @@ abstract class Connection implements Closeable {
|
|||
boolean searchPaths = false
|
||||
if (search.searchPaths != null)
|
||||
searchPaths = search.searchPaths
|
||||
boolean regex = false
|
||||
if (search.regex != null)
|
||||
regex = search.regex
|
||||
|
||||
byte[] sig = null
|
||||
if (search.sig != null) {
|
||||
|
@ -342,6 +346,7 @@ abstract class Connection implements Closeable {
|
|||
compressedResults : compressedResults,
|
||||
collections : collections,
|
||||
searchPaths: searchPaths,
|
||||
regex: regex,
|
||||
persona : originator)
|
||||
QueryEvent event = new QueryEvent ( searchEvent : searchEvent,
|
||||
replyTo : replyTo,
|
||||
|
|
|
@ -15,11 +15,14 @@ class SearchEvent extends Event {
|
|||
Persona persona
|
||||
boolean collections
|
||||
boolean searchPaths
|
||||
boolean regex
|
||||
|
||||
String toString() {
|
||||
def infoHash = null
|
||||
if (searchHash != null)
|
||||
infoHash = new InfoHash(searchHash)
|
||||
"searchTerms: $searchTerms searchHash:$infoHash, uuid:$uuid oobInfohash:$oobInfohash searchComments:$searchComments compressedResults:$compressedResults"
|
||||
"searchTerms: $searchTerms searchHash:$infoHash, uuid:$uuid " +
|
||||
"oobInfohash:$oobInfohash searchComments:$searchComments " +
|
||||
"compressedResults:$compressedResults regex:$regex"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue