public class URLClassifyProcessor extends UpdateRequestProcessor
This processor is intended used in connection with processing web resources, and helping to produce values which may be used for boosting or filtering later.
next
Constructor and Description |
---|
URLClassifyProcessor(SolrParams parameters,
SolrQueryRequest request,
SolrQueryResponse response,
UpdateRequestProcessor nextProcessor) |
Modifier and Type | Method and Description |
---|---|
URL |
getCanonicalUrl(URL url)
Gets a canonical form of the URL for use as main URL
|
URL |
getNormalizedURL(String url) |
boolean |
isEnabled() |
boolean |
isLandingPage(URL url)
Calculates whether the URL is a landing page or not
|
boolean |
isTopLevelPage(URL url)
Calculates whether a URL is a top level page
|
int |
length(URL url)
Calculates the length of the URL in characters
|
int |
levels(URL url)
Calculates the number of path levels in the given URL
|
void |
processAdd(AddUpdateCommand command) |
void |
setEnabled(boolean enabled) |
finish, processCommit, processDelete, processMergeIndexes, processRollback
public URLClassifyProcessor(SolrParams parameters, SolrQueryRequest request, SolrQueryResponse response, UpdateRequestProcessor nextProcessor)
public void processAdd(AddUpdateCommand command) throws IOException
processAdd
in class UpdateRequestProcessor
IOException
public URL getCanonicalUrl(URL url)
url
- The input urlpublic int length(URL url)
url
- The input URLpublic int levels(URL url)
url
- The input URLpublic boolean isTopLevelPage(URL url)
url
- The input URLpublic boolean isLandingPage(URL url)
url
- The input URLpublic URL getNormalizedURL(String url) throws MalformedURLException, URISyntaxException
public boolean isEnabled()
public void setEnabled(boolean enabled)
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.