# How to use a custom scoring script that has a lot of dependencies?

**URL:** <https://discuss.elastic.co/t/how-to-use-a-custom-scoring-script-that-has-a-lot-of-dependencies/40515>\
**Category:** Elasticsearch\
**Created:** [January 29, 2016, 7:12pm UTC](https://discuss.elastic.co/t/how-to-use-a-custom-scoring-script-that-has-a-lot-of-dependencies/40515 "2016-01-29T19:12:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![apanimesh061](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/apanimesh061/32/927_2.png) [@apanimesh061](https://discuss.elastic.co/u/apanimesh061)\
**Post date:** [January 29, 2016, 7:12pm UTC](https://discuss.elastic.co/t/how-to-use-a-custom-scoring-script-that-has-a-lot-of-dependencies/40515/1 "2016-01-29T19:12:41Z")

</div>

I have a java file that creates a custom scoring in:

```
"similarity.default.type": "com.engine.scoring.elasticsearch.TweakedSimilarity"

```

and there are other files also that define filters and analyzers which are similar kind of package structure.

Almost all of those files have a lot dependencies like `lucene`, `elasticsearch`, `java.io` etc.

Even if I place the java file in the `config/scripts` directory I always get error that the file wasn't found.

I am not sure whether or not should I class files or java files? Both are not running.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:20pm UTC](https://discuss.elastic.co/t/how-to-use-a-custom-scoring-script-that-has-a-lot-of-dependencies/40515/2 "2017-07-05T23:20:18Z")

</div>


