Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target/
23 changes: 23 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>plugin-solr</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
5 changes: 5 additions & 0 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
eclipse.preferences.version=1
encoding//src/java=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8
8 changes: 8 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
4 changes: 4 additions & 0 deletions .settings/org.eclipse.m2e.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,18 @@ public SolrFacetedResult getFacetedSearchResults( String strQuery, String [ ] fa
{
for ( String strFacetQuery : facetQueries )
{
String [ ] myValues = strFacetQuery.split( ":", 2 );
if ( myValues != null && myValues.length == 2 )
{
myValuesList = getFieldArrange( myValues, myValuesList );
}
if ( isComplexFacetQuery(strFacetQuery) )
{
query.addFilterQuery( strFacetQuery );
}
else
{
String [ ] myValues = strFacetQuery.split( ":", 2 );
if ( myValues != null && myValues.length == 2 )
{
myValuesList = getFieldArrange( myValues, myValuesList );
}
}
}

for ( Entry<Field, List<String>> entry : myValuesList.entrySet( ) )
Expand Down Expand Up @@ -457,7 +464,23 @@ public SolrFacetedResult getFacetedSearchResults( String strQuery, String [ ] fa
return facetedResult;
}

/**
private boolean isComplexFacetQuery(String strFacetQuery)
{
String[] tabComplexQueryChar = {"(",")","[","]", " OR ", " AND ", "-", "+", "=","^"};
if ( strFacetQuery != null )
{
for ( String strComplexChar : tabComplexQueryChar )
{
if ( StringUtils.contains(strFacetQuery, strComplexChar) )
{
return true;
}
}
}
return false;
}

/**
* @param strValues
* @param strStart
* @param strEnd
Expand Down Expand Up @@ -599,11 +622,18 @@ public List<SolrSearchResult> getGeolocSearchResults( String strQuery, String [
{
for ( String strFacetQuery : facetQueries )
{
String [ ] myValues = strFacetQuery.split( ":", 2 );
if ( myValues != null && myValues.length == 2 )
{
myValuesList = getFieldArrange( myValues, myValuesList );
}
if ( isComplexFacetQuery(strFacetQuery) )
{
query.addFilterQuery( strFacetQuery );
}
else
{
String [ ] myValues = strFacetQuery.split( ":", 2 );
if ( myValues != null && myValues.length == 2 )
{
myValuesList = getFieldArrange( myValues, myValuesList );
}
}
}

for ( Entry<Field, List<String>> entry : myValuesList.entrySet( ) )
Expand Down