Crawling with a depth limit

It is possible to impose a limit to the crawling based on a depth limit. The configuration is done by creating a bean of DepthFilter type and passing the reference on the UriFilterConfigurator bean, as described in the Configuring Filters tutorial.


	<bean id="UriFilterBean"
		class="org.dice_research.squirrel.data.uri.filter.UriFilterConfigurator">
		<constructor-arg index="0" ref="mongoDBKnowUriFilter" />
		<constructor-arg index="1">
			<list>
				  <ref bean="depthFilter" />
			</list>
		</constructor-arg>
		<constructor-arg index="2" value="OR" />
	</bean>
	   
	<bean id="depthFilter"
		class="org.dice_research.squirrel.data.uri.filter.DepthFilter">
		<constructor-arg index="0" value="5" />
	</bean>
      

The DepthFilter constructor receives only one constructor, which is the number that express the maximum depth. When the filter detects an URI highter than the specified, it will inform the Frontier to not crawl it.