Skip to content

Commit

Permalink
fixes for solr6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
samsk committed Sep 6, 2016
1 parent 358bbc0 commit 74ca918
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 20 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2016-09-01 Sam <samuel_._behan_(at)_dob_._sk>

* version 0.2.5 for apache-solr-6.1.0

2011-08-25 Sam <samuel_._behan_(at)_dob_._sk>

* version 0.2.4 for apache-solr-3.3.0
Expand Down
4 changes: 2 additions & 2 deletions README
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
################################################################################

Program : solr_pager
Version : 0.2.4
Version : 0.2.5
Purpose : Pager component for SOLR
License : GNU GPL v3 (see file COPYING)
Author : Samuel Behan <samuel_._behan_(at)_dob_._sk> (c) 2000-2011
Author : Samuel Behan <samuel_._behan_(at)_dob_._sk> (c) 2000-2016
Web : http://devel.dob.sk/solr_pager
Requirements : JAVA 1.5, SOLR 1.4+, ANT

Expand Down
4 changes: 2 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
solr_pager
Provides simple and fast paging for SOLR results
Samuel Behan <samuel_behan_(at)_dob_._sk>
Samuel Behan <samuel_._behan_(at)_dob_._sk>
======================================================================
-->
<project name="solr_pager" default="default">
Expand Down Expand Up @@ -48,7 +48,7 @@
target: compile
================================= -->
<target name="compile" depends="depends" description="--&gt; Compile solr_pager sources">
<javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="lib.path" debug="on">
<javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="lib.path" debug="on" includeantruntime="false">
<!-- <compilerarg value="-Xlint:unchecked"/> -->
</javac>
</target>
Expand Down
Binary file removed libs/lucene/lucene-core-3.3.0.jar
Binary file not shown.
Binary file added libs/lucene/lucene-core-6.1.0.jar
Binary file not shown.
Binary file removed libs/solr/apache-solr-core-3.3.0.jar
Binary file not shown.
Binary file removed libs/solr/apache-solr-solrj-3.3.0.jar
Binary file not shown.
Binary file removed libs/solr/slf4j-api-1.6.1.jar
Binary file not shown.
Binary file added libs/solr/slf4j-api-1.7.7.jar
Binary file not shown.
Binary file added libs/solr/solr-core-6.1.0.jar
Binary file not shown.
Binary file added libs/solr/solr-solrj-6.1.0.jar
Binary file not shown.
29 changes: 13 additions & 16 deletions src/sk/dob/search/solr/handler/component/PagerComponent.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void prepare(ResponseBuilder rb) throws IOException
{
/* notify solr we always need resultset ! */
if(rb.req.getParams().getInt(PARAM_PAGER, 0) != 0)
rb.setNeedDocSet( true );
rb.setNeedDocSet(true);
}

@Override
Expand All @@ -75,7 +75,8 @@ public void process(ResponseBuilder rb) throws IOException

if(rb.getResults().docSet != null)
doc_count = rb.getResults().docSet.size();
else return;
else
return;

/* pager list */
NamedList lst = new SimpleOrderedMap<Object>();
Expand Down Expand Up @@ -110,11 +111,12 @@ else if(page_actual + page_post > page_count)
page_post = 0;

/* next pages list */
int i = (page_actual - page_pre);
for(i = (i <= 0 ? 0 : i);
i < page_count && i <= (page_actual + page_post);
i++)
lst2.add(Integer.toString(i + 1), i * rows);
int idx = (page_actual - page_pre);
for(idx = (idx <= 0 ? 0 : idx);
idx < page_count && idx <= (page_actual + page_post);
idx++) {
lst2.add(Integer.toString(idx + 1), idx * rows);
}
lst.add("pages", lst2);

/* navi */
Expand Down Expand Up @@ -153,22 +155,17 @@ public void finishStage(ResponseBuilder rb)

@Override
public String getDescription() {
return "Pager";
return "Solr Pager";
}

@Override
public String getVersion() {
return "$Revision: 1 $";
return "1.0";
}

@Override
public String getSourceId() {
return "$Id: $";
}


@Override
public String getSource() {
return "$URL: http://devel.dob.sk/solr_pager $";
return "URL: https://devel.dob.sk/solr_pager";
}

@Override
Expand Down

0 comments on commit 74ca918

Please sign in to comment.