Question: I have several documents, that have a title:

1. -> "Just some Word 13 from year 2015"
2. -> "Just some Word 13 from year 2011"
3. -> "Just some Word 13 from year 2012"
4. -> "Just some Word 13 from year 2014"
5. -> "Just some Word 13 from year 2013"

When searching for 13 i'm expecting number 5 to be the first result because 13 is exists twice.

Field is multiValued="true".

My fieldtype for indexing looks like this:

```
<analyzer type="index">
   <charFilter class="solr.PatternReplaceCharFilterFactory" pattern="[(&quot;)(,:;!?)]" replacement=""/>
   <tokenizer class="solr.WhitespaceTokenizerFactory"/>
   <filter class="solr.LowerCaseFilterFactory"/>
   <filter class="solr.ReverseStringFilterFactory"/>
   <filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="30" side="front"/>
   <filter class="solr.ReverseStringFilterFactory"/>
</analyzer>

```

Answer: 
It doesn't sound quite right to have one test depending on an another test to define and export a variable. Set the global variable inside `onPrepare()` using `global`:

```
onPrepare: function() {
    global.caseNumber = moment().format('YYYYMMDD-HHmmss-SS');
},

```

Then, you'll have `caseNumber` as a global variable across all the tests.
There's no need to use globals. You can make it more readable by creating your own module and requiring it:

```
//test/lib/homepage.js
var moment = require('moment');
module.exports = {
  caseNumber: moment().format('YYYYMMDD-HHmmss-SS'),

  getContent: function () {  //another example of reuse
    return element(by.css('body'));
  });
};

//test/homepage.spec.js
var page = require('./lib/homepage');

describe('Homepage', function() {
  it('should display correct date', function () {
    expect(page.getContent()).toContain(page.caseNumber);
  });
});

```