fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
some fixes to oaipmh: namespaces
[wolnelektury.git]
/
apps
/
search
/
custom.py
diff --git
a/apps/search/custom.py
b/apps/search/custom.py
index
6cb18fd
..
6c16f22
100644
(file)
--- a/
apps/search/custom.py
+++ b/
apps/search/custom.py
@@
-119,8
+119,8
@@
class CustomSolrInterface(sunburnt.SolrInterface):
if matches:
return self.substring(kwargs['text'], matches,
if matches:
return self.substring(kwargs['text'], matches,
-
margins=kwargs.get('margins', 30),
- mark=kwargs.get('mark', ("<b>", "</b>")))
+ margins=kwargs.get('margins', 30),
+
mark=kwargs.get('mark', ("<b>", "</b>")))
else:
return None
else:
return None
@@
-151,5
+151,6
@@
class CustomSolrInterface(sunburnt.SolrInterface):
snip = snip[:e + off] + mark[1] + snip[e + off:]
snip = snip[:s + off] + mark[0] + snip[s + off:]
# maybe break on word boundaries
snip = snip[:e + off] + mark[1] + snip[e + off:]
snip = snip[:s + off] + mark[0] + snip[s + off:]
# maybe break on word boundaries
+
return snip
return snip