public void initialisation(int fromScoreParam, int toScoreParam){
        synchronized(this){//one thread at time access one posting list
            if(postingListMemoryMapped!=null){
                if(inUse){
//                    System.out.println("Waiting for posting list "+entry+ "to become available");
                    try{
                        this.wait(10000); //one thread at time access one posting list. However if a tread takes too long we do not starve
                    }catch(Exception e){
                        e.printStackTrace();
                    }
                }
//                System.out.println("Taking a lock on posting list "+entry);
                inUse=true;
                currentScore=Math.max(fromScoreParam,0);
                currentPos=fromPos=postingListIndex[Math.max(fromScoreParam,0)];
                toPos=postingListIndex[Math.min(toScoreParam+1,postingListIndex.length-1)];
                postingListMemoryMapped.position((int)fromPos-postingListIndex[0]);
            }
        }
    }